From: Eric Dumazet <dada1@cosmosbay.com>
To: Zachary Amsden <zach@vmware.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Andrew Morton <akpm@osdl.org>,
Andi Kleen <ak@muc.de>, Jeremy Fitzhardinge <jeremy@goop.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Chris Wright <chrisw@sous-sol.org>,
Hugh Dickins <hugh@veritas.com>,
David Rientjes <rientjes@google.com>,
Michel Lespinasse <walken@vmware.com>,
Virtualization Mailing List <virtualization@lists.osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/4] i386 - pte update optimizations
Date: Fri, 13 Apr 2007 08:00:46 +0200 [thread overview]
Message-ID: <461F1C8E.1010104@cosmosbay.com> (raw)
In-Reply-To: <461EE9E5.6060403@vmware.com>
[-- Attachment #1: Type: text/plain, Size: 771 bytes --]
Zachary Amsden a écrit :
>
> Yes. Even then, last time I clocked instructions, xchg was still slower
> than read / write, although I could be misremembering. And it's not
> totally clear that they will always be in cached state, however, and for
> SMP, we still want to drop the implicit lock in cases where the
> processor might not know they are cached exclusive, but we know there
> are no other racing users. And there are plenty of old processors out
> there to still make it worthwhile.
>
Is there one processor that benefit from this patch then ?
I couldnt get a win on my test machines, maybe they are not old enough ;)
umask() doesnt need xchg() atomic semantic. If several threads are using
umask() concurrently results are not guaranted anyway.
[-- Attachment #2: umask.patch --]
[-- Type: text/plain, Size: 441 bytes --]
--- linux-2.6.21-rc6/kernel/sys.c
+++ linux-2.6.21-rc6-ed/kernel/sys.c
@@ -2138,8 +2138,10 @@ asmlinkage long sys_getrusage(int who, s
asmlinkage long sys_umask(int mask)
{
- mask = xchg(¤t->fs->umask, mask & S_IRWXUGO);
- return mask;
+ struct fs_struct *fs = current->fs;
+ int old = fs->umask;
+ fs->umask = mask & S_IRWXUGO;
+ return old;
}
asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
next prev parent reply other threads:[~2007-04-13 6:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 5:30 [PATCH 0/4] i386 - pte update optimizations Zachary Amsden
2007-04-13 1:25 ` H. Peter Anvin
2007-04-13 2:24 ` Zachary Amsden
2007-04-13 6:00 ` Eric Dumazet [this message]
2007-04-13 6:25 ` H. Peter Anvin
2007-04-13 9:31 ` Keir Fraser
2007-04-13 12:27 ` Andi Kleen
2007-04-13 11:31 ` Keir Fraser
2007-04-13 15:34 ` H. Peter Anvin
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=461F1C8E.1010104@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=hpa@zytor.com \
--cc=hugh@veritas.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@google.com \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.osdl.org \
--cc=walken@vmware.com \
--cc=zach@vmware.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 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).