[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6413675eedcfa_33bc9d208e9@willemb.c.googlers.com.notmuch>
Date: Thu, 16 Mar 2023 15:00:46 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: David Howells <dhowells@...hat.com>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: dhowells@...hat.com, Matthew Wilcox <willy@...radead.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Jens Axboe <axboe@...nel.dk>, Jeff Layton <jlayton@...nel.org>,
Christian Brauner <brauner@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
netdev@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC PATCH 03/28] tcp: Support MSG_SPLICE_PAGES
David Howells wrote:
> Willem de Bruijn <willemdebruijn.kernel@...il.com> wrote:
>
> > The commit message mentions MSG_SPLICE_PAGES as an internal flag.
> >
> > It can be passed from userspace. The code anticipates that and checks
> > preconditions.
>
> Should I add a separate field in the in-kernel msghdr struct for such internal
> flags? That would also avoid putting an internal flag in the same space as
> the uapi flags.
That would work, if no cost to common paths that don't need it.
A not very pretty alternative would be to add an an extra arg to each
sendmsg handler that is used only when called from sendpage.
There are a few other internal MSG_.. flags, such as
MSG_SENDPAGE_NOPOLICY. Those are all limited to sendpage, and ignored
in sendmsg, I think. Which would explain why it was clearly safe to
add them.
Powered by blists - more mailing lists