From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Arjan van de Ven <arjan@infradead.org>,
Jakub Jelinek <jakub@redhat.com>,
Ulrich Drepper <drepper@redhat.com>,
Roland McGrath <roland@redhat.com>,
"Randy.Dunlap" <rdunlap@xenotime.net>,
akpm@osdl.org, linux-kernel@vger.kernel.org,
libc-alpha@sourceware.org
Subject: Re: [PATCH] Use uname not sysctl to get the kernel revision
Date: Sat, 15 Jul 2006 04:45:45 +1000 [thread overview]
Message-ID: <1152902745.23037.88.camel@localhost.localdomain> (raw)
In-Reply-To: <1152745664.22943.115.camel@localhost.localdomain>
On Thu, 2006-07-13 at 00:07 +0100, Alan Cox wrote:
> Ar Mer, 2006-07-12 am 16:26 -0600, ysgrifennodd Eric W. Biederman:
> > If the lock is not short lived then the release is like to be a long
> > ways off. If the lock is not highly contended then you are not likely
> > to hit the window when someone else as the contended lock.
> >
> > How frequent are highly contended short lived locks in user space?
>
> I'm not sure it matters.
>
> If you want to do the job right then do this
>
> - Stick an indicator of how much else wants to run on this CPU in the
> vsyscall page or similar location
Except that "this cpu" doesn't really mean anything in userspace, and
while I think Andi has some tricks to get some sort of CPU number to
userspace (though it's really only valid during the execution of the
instruction that reads it :) I haven't yet found an equivalent for
powerpc (and possibly other architectures will have the same problem).
> In your locks you can now do
>
> while(try_and_grab_lock() == FAILED) {
> if (kernelpage->waiting > 0)
> sys_somelockwaitthing()
> }
>
> Furthermore the kernel can be intelligent about the waiting indicator
> for power or other global scheduling reasons
>
> [Disclaimer: There is a patent issue around this technique but its not
> one that will impact GPL code as permissions are given for GPL use.]
>
> Alan
next prev parent reply other threads:[~2006-07-14 18:48 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 22:39 [PATCH] sysctl: Document that sys_sysctl will be removed Eric W. Biederman
2006-07-10 22:50 ` Randy.Dunlap
2006-07-11 4:10 ` Eric W. Biederman
2006-07-11 7:07 ` Arjan van de Ven
2006-07-12 16:25 ` [PATCH] Use uname not sysctl to get the kernel revision Eric W. Biederman
2006-07-12 16:50 ` Ulrich Drepper
2006-07-12 17:42 ` Eric W. Biederman
2006-07-12 23:24 ` Theodore Tso
2006-07-12 23:31 ` Andi Kleen
2006-07-13 0:12 ` Theodore Tso
2006-07-13 2:33 ` Eric W. Biederman
2006-07-13 12:15 ` Andi Kleen
2006-07-12 23:44 ` Steve Munroe
2006-07-14 18:49 ` Benjamin Herrenschmidt
2006-07-14 19:09 ` Andi Kleen
2006-07-13 0:19 ` Eric W. Biederman
2006-07-12 18:44 ` Roland McGrath
2006-07-12 19:33 ` Ulrich Drepper
2006-07-12 19:53 ` Jakub Jelinek
2006-07-12 20:09 ` H. Peter Anvin
2006-07-12 21:23 ` Eric W. Biederman
2006-07-12 21:29 ` Arjan van de Ven
2006-07-12 21:56 ` Eric W. Biederman
2006-07-12 22:01 ` Arjan van de Ven
2006-07-12 22:02 ` H. Peter Anvin
2006-07-12 22:26 ` Eric W. Biederman
2006-07-12 22:31 ` H. Peter Anvin
2006-07-12 23:07 ` Alan Cox
2006-07-12 23:19 ` H. Peter Anvin
2006-07-13 11:15 ` Alan Cox
2006-07-14 18:45 ` Benjamin Herrenschmidt [this message]
2006-07-14 19:11 ` H. Peter Anvin
2006-07-12 21:29 ` H. Peter Anvin
2006-07-12 21:33 ` Michael Tokarev
2006-07-13 5:17 ` Ulrich Drepper
2006-07-13 6:27 ` Ian Wienand
2006-07-13 14:39 ` Eric W. Biederman
2006-07-13 15:05 ` Arjan van de Ven
-- strict thread matches above, loose matches on Subject: below --
2006-07-13 5:00 Albert Cahalan
2006-07-13 5:42 ` H. Peter Anvin
2006-07-13 6:09 ` Albert Cahalan
2006-07-13 6:13 ` Albert Cahalan
2006-07-13 6:38 ` Eric W. Biederman
2006-07-13 16:15 ` Albert Cahalan
2006-07-13 16:53 ` Eric W. Biederman
2006-07-13 17:06 ` Albert Cahalan
2006-07-13 15:20 ` Eric W. Biederman
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=1152902745.23037.88.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=drepper@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jakub@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=roland@redhat.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.