From: Andi Kleen <andi@firstfloor.org>
To: Steve Munroe <sjmunroe@us.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>, Andi Kleen <ak@linux.intel.com>,
libc-alpha@sourceware.org, linux-kernel@vger.kernel.org,
Denys Vlasenko <vda.linux@googlemail.com>
Subject: Re: [PATCH 4/5] Add a sysconf syscall
Date: Mon, 16 May 2011 22:51:50 +0200 [thread overview]
Message-ID: <20110516205150.GG25898@one.firstfloor.org> (raw)
In-Reply-To: <OFD2EE69FB.301A458A-ON86257892.00631BE8-86257892.006A93AF@us.ibm.com>
> The syscall is only current if you call it frequently (i.e. every time),
> but there is tendency to go local (static memory) caching to avoid the
> syscall overhead. Something like _SC_NPROCESSORS_ONLN that is used to set
> up OpenMP/auto-parallel threading for major loops is likely to be cached.
That is true. Still I assume other programs would ask for it more frequently.
Longer term at some point we probably need a proper CPU hotplug
event interface, but short term polling is the standard model.
>
> But if you look at the gettimeofday/vdso implementation, the time_base to
> time conversion is semi-dynamic for the NTPd case and we handle that in
> VDSO. There is shared memory access between the VDSO and the kernel for
> this case.
Yes, I wrote that code for x86 ;-)
> Is problem with rlimit that it is process or session dependent? But is it
> really dynamic once a process starts?
It can be changed any time per thread (actually per signal context).
Now that's probably not common, but I don't think a new ABI should
ignore the possibility of it changing anyways.
> It is not clear one size fits all here.
What partition would you suggest?
Also do you have a use case where the syscall is too slow?
I'm basically trying to find a good tradeoff for implementation effort
vs usefullness vs good semantics vs performance here.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2011-05-16 20:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110516205150.GG25898@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sjmunroe@us.ibm.com \
--cc=vda.linux@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.