linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Add a sysconf syscall
@ 2011-05-13 23:24 Andi Kleen
  2011-05-13 23:24 ` [PATCH 1/5] VFS: Make symlink nesting limit a define Andi Kleen
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: Andi Kleen @ 2011-05-13 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: libc-alpha

We ran into some problems with programs querying then number
of processors at startup through sysconf. This calls into /proc
from glibc, which is quite slow and scales poorly if the program
is frequently executed. This happens with programs using
Sleepycat DB for example.

While there are worarounds -- like using sched_getaffinity --
they don't have quite equivalent semantics.

This patchkit adds a sysconf() syscall to the kernel that allows
to get this information much faster. It only implements a subset
of sysconf() -- all the information the kernel knows usefully
about.

Another advantage is that the kernel can in several cases offer
more accurate information than glibc, which has to guess.

The syscall is quite compat and not a significant burden.

In addition I did a few cleanups first to export all the information
needed by sysconf clearly from other subsystems.

-Andi


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2011-05-26 18:46 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-13 23:24 Add a sysconf syscall Andi Kleen
2011-05-13 23:24 ` [PATCH 1/5] VFS: Make symlink nesting limit a define Andi Kleen
2011-05-13 23:24 ` [PATCH 2/5] Move max_threads variable declaration into include file Andi Kleen
2011-05-13 23:24 ` [PATCH 3/5] EXEC: Use define for stack to argument size limit Andi Kleen
2011-05-13 23:24 ` [PATCH 4/5] Add a sysconf syscall Andi Kleen
2011-05-14  6:57   ` Ingo Molnar
2011-05-14 16:34     ` Andi Kleen
2011-05-16 13:36       ` Ingo Molnar
2011-05-17 11:25         ` Ingo Molnar
2011-05-16 15:51       ` Andy Lutomirski
2011-05-16 16:08         ` Andi Kleen
2011-05-16 17:06           ` Andrew Lutomirski
     [not found]           ` <OFCC4C610A.F152D00D-ON86257892.005E11F4-86257892.005E22BA@us.ibm.com>
     [not found]             ` <4DD15E9B.2090809@linux.intel.com>
2011-05-17 10:59               ` Ingo Molnar
2011-05-16 15:42   ` Denys Vlasenko
2011-05-16 16:01     ` Andi Kleen
     [not found]       ` <OF30360F87.5C6D6DCF-ON86257892.005D7E68-86257892.005E0059@us.ibm.com>
2011-05-16 17:39         ` Andi Kleen
     [not found]           ` <OFD2EE69FB.301A458A-ON86257892.00631BE8-86257892.006A93AF@us.ibm.com>
2011-05-16 20:51             ` Andi Kleen
2011-05-17 12:33       ` Denys Vlasenko
2011-05-13 23:24 ` [PATCH 5/5] Hook up sysconf syscall for all architectures Andi Kleen
2011-05-14  1:21   ` David Miller
2011-05-14  2:51     ` Andi Kleen
2011-05-14  2:23   ` Mike Frysinger
2011-05-24  1:46     ` Mike Frysinger
2011-05-26 18:04       ` Mike Frysinger
2011-05-26 18:45         ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).