netdev
[Top] [All Lists]

Re: [PATCH] Improve behaviour of Netlink Sockets

To: Pablo Neira <pablo@xxxxxxxxxxx>
Subject: Re: [PATCH] Improve behaviour of Netlink Sockets
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 21 Sep 2004 19:50:40 -0700
Cc: herbert@xxxxxxxxxxxxxxxxxxx, hadi@xxxxxxxxxx, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <4150E7E5.2000001@xxxxxxxxxxx>
References: <E1C8way-0000aH-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20040919120249.GA5963@xxxxxxxxxxxxxxxxxxx> <414DF11C.1080505@xxxxxxxxxxx> <20040919215915.GB9573@xxxxxxxxxxxxxxxxxxx> <1095633569.1047.107.camel@xxxxxxxxxxxxxxxx> <20040919231734.GA10124@xxxxxxxxxxxxxxxxxxx> <1095647944.1046.206.camel@xxxxxxxxxxxxxxxx> <20040920025802.GA11567@xxxxxxxxxxxxxxxxxxx> <1095683660.1047.254.camel@xxxxxxxxxxxxxxxx> <414F1E12.6010808@xxxxxxxxxxx> <20040922000503.GA13218@xxxxxxxxxxxxxxxxxxx> <4150E7E5.2000001@xxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
I think you should manage your "events" in your own data structure.
Perhaps a circular buffer of some sort.

Then provide ->dump() operation which fishes the events out of
the circular buffer.

That way you don't have to spam user space with a bunch of quick
transactions, you just wake him up once and several events may
be consumed and processed at once.

You can make your own buffering policies that way, and therefore
there is no need to complicate netlink for this purpose.

Meanwhile, I'm going to revert Pablo's original netlink optimization
until this is all sorted out.


<Prev in Thread] Current Thread [Next in Thread>