[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131001032715.GW13318@ZenIV.linux.org.uk>
Date: Tue, 1 Oct 2013 04:27:15 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Waiman Long <Waiman.Long@...com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
"Chandramouleeswaran, Aswin" <aswin@...com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: spinlock contention of files->file_lock
On Mon, Sep 30, 2013 at 07:02:23PM -0700, Linus Torvalds wrote:
> Shouldn't a cmpxchg() in just the dup2 code solve that?
>
> If the old value was NULL, you'd have to repeat and go back and see if
> the open_fds[] bit had been cleared in the meantime (ie it's NULL not
> because somebody else is busy installing it, but because somebody just
> uninstalled it).
Yechh... Under ->file_lock (in do_dup2()), hopefully? Or you'll get
all kinds of fun with close() thrown into the game, as well...
> But yeah, I do agree that that sounds nasty and a complication I
> hadn't even thought about. dup2() does violate our normal "let's
> pre-allocate the fd slot" rule. Ugh.
Hell knows... Descriptor handling *is* pretty well isolated these
days, so it just might be doable without disrupting the living hell
out of anything else. fs/file.c is pretty much it - everything else
goes through it.
I've enough on my plate at the moment with fs/namespace.c and fs/namei.c,
though, and praying hard fs/inode.c doesn't enter the game. I _know_
that fs/notify will and I'm not enjoying that for a second. BTW, has
eparis resurfaced with any fixes for *notify/umount races? I don't seem
to have anything related in the mailbox, but...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists