On Fri, 2005-04-08 at 21:36 +1000, Herbert Xu wrote:
> On Thu, Apr 07, 2005 at 04:36:41PM -0700, Dmitry Yusupov wrote:
> > This actually even better since we will guarantee "down" call delivery.
> > My only concern is that it is not very generic. Do you know clean way to
> > implement it?
> How generic do you want this? Do you need this for socket types other
> than netlink?
as discussed on kernel-summit-discuss. yes. we need generic OOM-safety
> For a one-packet version, we can pre-allocate an skb/page in response to
> a setsockopt and store it in sk_send_head/sk_sndmsg_page.
> This can then be used at sendmsg time. Obviously subsequent messages
> will have to use alloc_skb until that skb is released.
> Alternatively, we can let the socket allocate skb's from an emergency
> pool similar to what was discussed in the thread
> "Summary of 2005 Kernel Summit Proposed Topics".
This is ideally how it should be for sendmsg paths. socket applications
like iscsi, nbd, etc will use it for TCP/IP type of socket. iscsi could
re-use the same generic "emergency pool" code for netlink.
> Again this could enabled on a setsockopt.