==> Regarding Re: [PATCH 4/7] netpoll: fix ->poll() locking; "David S. Miller"
<davem@xxxxxxxxxxxxx> adds:
davem> On Fri, 22 Apr 2005 18:24:46 -0400 Jeff Moyer <jmoyer@xxxxxxxxxx>
davem> wrote:
>> ==> Regarding [PATCH 4/7] netpoll: fix ->poll() locking; Matt Mackall
>> <mpm@xxxxxxxxxxx> adds:
>>
mpm> Introduce a per-client poll lock and flag. The lock assures we never
mpm> have more than one caller in dev->poll(). The flag provides recursion
mpm> avoidance on UP where the lock disappears.
>> I don't think it makes sense to have the poll lock associated with a
>> struct netpoll.
davem> There should be a 1 to 1 relationship from netdev to netpoll, but I
davem> see no problems with a many to 1 relationship from netdev to
davem> netpoll, that is perfectly legal. It would give more stringent
davem> locking on dev->poll() invocations, not forget to lock when
davem> necessary.
davem> The only thing which is wrong is that netpoll_setup() should verify
davem> that netdev-> np is NULL, and if it is not it should return an error.
Oh yes, of course. Somehow I managed to forget that we now squirrel away
the struct netpoll pointer in the net_device. Previously you could
register multiple netpoll clients to one device, and this was useful for
say doing netconsole and netdump over the same interface. If we've removed
this ability, this is a bad thing. Oh dear...
-Jeff
|