[systemd-devel] [PATCH] Detect page size runtime
fykcee1 at gmail.com
fykcee1 at gmail.com
Thu Mar 17 20:44:58 PDT 2011
Hi all,
Systemd hardcode page size as 4096(in macro.h), this is not always correct:
""" Some architectures support multiple machine types with diffenent
page sizes, and some machine types even support multiple page sizes
themselves. """
This patch tries to detect page size runtime by sysconf(_SC_PAGESIZE),
and uses 4096 as a failsafe value. Note we need memset vec to zero
before call mincore(src/readahead-collect.c, 129) -- if the pagesize
is not correct, we may randomly record wider range or more ranges to
readahead.
--
Regards,
- cee1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Detect-page-size-runtime.patch
Type: application/octet-stream
Size: 4979 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110318/ce482c66/attachment.obj>
More information about the systemd-devel
mailing list