lkml.org 
[lkml]   [2023]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH net-next v3 01/18] net: Copy slab data for sendmsg(MSG_SPLICE_PAGES)
    On Thu, Jun 22, 2023 at 11:12 AM Jakub Kicinski <kuba@kernel.org> wrote:
    >
    > On Tue, 20 Jun 2023 15:53:20 +0100 David Howells wrote:
    > > If sendmsg() is passed MSG_SPLICE_PAGES and is given a buffer that contains
    > > some data that's resident in the slab, copy it rather than returning EIO.
    >
    > How did that happen? I thought MSG_SPLICE_PAGES comes from former
    > sendpage users and sendpage can't operate on slab pages.
    >
    > > This can be made use of by a number of drivers in the kernel, including:
    > > iwarp, ceph/rds, dlm, nvme, ocfs2, drdb. It could also be used by iscsi,
    > > rxrpc, sunrpc, cifs and probably others.
    > >
    > > skb_splice_from_iter() is given it's own fragment allocator as
    > > page_frag_alloc_align() can't be used because it does no locking to prevent
    > > parallel callers from racing.
    >
    > The locking is to local_bh_disable(). Does the milliont^w new frag
    > allocator have any additional benefits?

    Actually I would be concerned about it causing confusion since it is
    called out as being how we do it for sockets but we already have
    several different socket based setups using skb_page_frag_refill() and
    the like.

    \
     
     \ /
      Last update: 2023-06-22 20:30    [W:6.917 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site