X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Freadahead-common.c;h=f0d57b4c6e49c1192dfe50b6fc57014ab893bbd5;hp=fc49a33109a748860daa8c4ac4da9336d5b80093;hb=d40c98162feaae6e43fa51d702da4153e3ec19dc;hpb=2b583ce6576d4a074ce6f1570b3e60b65c64ae7d diff --git a/src/readahead-common.c b/src/readahead-common.c index fc49a3310..f0d57b4c6 100644 --- a/src/readahead-common.c +++ b/src/readahead-common.c @@ -154,9 +154,8 @@ bool enough_ram(void) { assert_se(sysinfo(&si) >= 0); - return si.totalram > 127 * 1024*1024; /* Enable readahead only - * with at least 128MB - * memory */ + /* Enable readahead only with at least 128MB memory */ + return si.totalram > 127 * 1024*1024 / si.mem_unit; } int open_inotify(void) { @@ -209,7 +208,6 @@ finish: return m; } - #define BUMP_REQUEST_NR (16*1024) int bump_request_nr(const char *p) {