[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110803193906.GA2921@redhat.com>
Date: Wed, 3 Aug 2011 21:39:06 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Vasiliy Kulikov <segoon@...nwall.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Manuel Lauss <manuel.lauss@...glemail.com>,
Richard Weinberger <richard@....at>,
Marc Zyngier <marc.zyngier@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] shm: optimize exit_shm()
On 08/03, Vasiliy Kulikov wrote:
>
> On Wed, Aug 03, 2011 at 21:21 +0200, Oleg Nesterov wrote:
> > > we should check .in_use once again after
> > > down_write().
> >
> > Why?
>
> https://lkml.org/lkml/2011/8/3/277
>
> "No, as I said in the comment above, other task may be holding the mutex and
> deleting the last shm segment.
This is obvious,
> "Should" == additional check might speed the things, so it worth checking.
and this is not.
I was confused, the changelog looks as if we _have to_ recheck
or something bad can happen.
But as I said, the patch looks correct anyway. I am not
sure the 2nd optimization really makes sense (this is very
unlikely case) but it doesn't hurt.
Oleg.
--
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