On Wed, May 01, 2019 at 04:14:41AM -0400, Eric Dumazet wrote: > On 4/30/19 9:17 PM, Matthew Wilcox wrote: > > It turns out there's a lot of accessors for the skb_frag, which would > > make this conversion really easy if some drivers didn't bypass them. > > This is what I've done so far; my laptop's not really beefy enough to > > cope with changing skbuff.h too often ;-) > > I guess the missing part here is the "why" all this is done ? > > 32 bit hosts will have bigger skb_shared_info and this impacts sk_rcvbuf and > sk_sndbuf limits. > > 17 * 4 are 68 extra bytes per skb.
Right. The plan is to replace get_user_pages() with get_user_bvec(). If userspace has physically consecutive pages (and often it will, even when not using THP), we can reduce the number of elements in the array at the start. So each skb_frag_t is larger, but you'll have fewer of them for a large I/O. Obviously this particularly benefits THP.