[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0906251858520.9517@makko.or.mcafeemobile.com>
Date: Thu, 25 Jun 2009 19:04:04 -0700 (PDT)
From: Davide Libenzi <davidel@...ilserver.org>
To: Eric Dumazet <eric.dumazet@...il.com>
cc: Oleg Nesterov <oleg@...hat.com>, Jiri Olsa <jolsa@...hat.com>,
netdev@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
fbl@...hat.com, nhorman@...hat.com, davem@...hat.com,
Tejun Heo <htejun@...il.com>
Subject: Re: [PATCH] net: fix race in the receive/select
On Fri, 26 Jun 2009, Eric Dumazet wrote:
> Davide Libenzi a écrit :
> > On Thu, 25 Jun 2009, Oleg Nesterov wrote:
> >
> >> Can't really comment this patch, except this all looks reasonable to me.
> >> Add more CCs.
> >
> > While this can work, IMO it'd be cleaner to have the smp_mb() moved from
> > fs/select.c to the ->poll() function.
> > Having a barrier that matches another one in another susbsystem, because
> > of the special locking logic of such subsystem, is not too shiny IMHO.
> >
>
> Yes but barrier is necessary only if add_wait_queue() was actually called, and __pollwait()
> does this call.
>
> Adding a plain smp_mb() in tcp_poll() for example would slowdown select()/poll() with NULL
> timeout.
Do you think of it as good design adding an MB on a subsystem, because of
the special locking logic of another one?
The (eventual) slowdown, IMO can be argued sideways, by saying that
non-socket users will pay the price for their polls.
- Davide
Powered by blists - more mailing lists