Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11356583rwd; Thu, 22 Jun 2023 12:07:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4v+PA8usGz7cLXBBnXtlR099STSrgBNKk43zbqQpcf314rpTBiuaEsvrJU9x4hINPFuYPj X-Received: by 2002:a17:90a:ad8f:b0:25e:85fd:5749 with SMTP id s15-20020a17090aad8f00b0025e85fd5749mr19920273pjq.8.1687460845910; Thu, 22 Jun 2023 12:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687460845; cv=none; d=google.com; s=arc-20160816; b=GYHpMVilGk48ARpx7+HRbqIU10yMgx6MKrHWonpqxYRErPEVTiMbIRxHjNZiuHDZlu m+51El36kOrrf4GNJyE/WTOjdNUsdfmcwmpvGccZP3z/gFl9JEhEWfuH5/1Cz9xIcxFJ AK5vfe2lbbgOb1k64D48tQvX8mqILfszVr/47/3jTfCGP2ftrch8s3cqUntT5R6iUPP5 zOVCAVZnJ0r8xIIKkZ87s84tPhC4vuiKsFnyoQTB7gRkArqVz5J7q9CelLgqzloGQ9vI 2gsC7aVJ0eC9rl5ZrXPowZv6fXWZHpCIDYnzQU/2X+V3CVnTs/wyfxmwmlssEhk0aRJf vZ3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+efte1YTdBvlCQmmBAcoCvTSuRZC5725VwKAKXACJmU=; b=rabH197aDuluspsAx7LTVBwmCGDsAuPB3N6z5pk+1qwGKdUVO7HcYiur8mss1/EXgf g6Mv4yWFqVkcIrc8wg/woGG2lw351zP6/jObINqDXSLZm546zHa1xk86++Qpwim2tLue pxJ/WseFdbUcJ58ofQzRCYVH8NBqZCLvr7ha08Xb3kqiSToKXlpmzbm9t/RM+0QbRyTB cs2KwzusRRtuS1cEmo00RVA+n7YZNP5NDMtsX/ZUd0qmvAzEb+LRnc/VzcwqxJpIrJd0 hIDeR/D4JKf3UWtAdTZLTucF9Ee2PEHj3nY6iFjutswxNz7HJm2cKfW1+g7i1P/23wpd 6MiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=f9WJGnOG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w29-20020a63935d000000b0054fda6ccf78si6926913pgm.415.2023.06.22.12.07.12; Thu, 22 Jun 2023 12:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=f9WJGnOG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231147AbjFVS3f (ORCPT + 99 others); Thu, 22 Jun 2023 14:29:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbjFVS3e (ORCPT ); Thu, 22 Jun 2023 14:29:34 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52C47FE; Thu, 22 Jun 2023 11:29:33 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-66615629689so6157632b3a.2; Thu, 22 Jun 2023 11:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687458573; x=1690050573; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+efte1YTdBvlCQmmBAcoCvTSuRZC5725VwKAKXACJmU=; b=f9WJGnOG5TWAXhkZnWiFgOETThzXsDSZ0L1DR1cjig1UrNiqbX/YkCFauiL1CfFUNa K/RrPM2m2UaVqArI8ThJ4AM13iq+7RBRqJUVS/OgF8R2daOi+Pk1qrh9stF2eDfhS8sd UXq9W/0ez1aBFtcKfj99q8aAl2RjXiUoV6qLhyU5eF9AxOBeAmEDALdFuDEiVOP7k6ed pe0nxuR3zg+3TSPMAjwRgWNz9f0vo4IRC0ZSUeldL6LPKi0UI3Kpz04qtY/8isTbI82z pj3BAgD/yZkpDGGOc+0ETyP92e+F7OL0i8PDu+lUpABDOMQPw+BKpXPpxnH6spwfzON6 NF+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687458573; x=1690050573; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+efte1YTdBvlCQmmBAcoCvTSuRZC5725VwKAKXACJmU=; b=FpQRDFql8vUl2oOT6Il1a9nGFTAkijCgrqBtJXiqs5vLzbHqXrt0ht00FY20rbYsbe Hk0pa0PMLRScVDoxzjMl3Wvl4msFinurg/faCizZr1YILbHVa1wA78QSgqed49sDJp19 CJbHZ1yCH8Yy20QZigfj0mcLaeoukEnOvyyY5soKuNFAFxqaJ71AI0tEbf7RbOsEf8XH WtzUXQhbLE8VkfC4lKf2LVDWCDoD0F4rHbWaOeOVDR2Lc7Hde1HBY4jIKEtZhWe2KCbW F7Ue/w4vGjux5q6866rGV2cvpok6/lYe9uFI4Z/HeTGL0a+oIYtxBckqEPwqWnvqPcYd LDVQ== X-Gm-Message-State: AC+VfDx9DGWKuyqo5pHzrIsrM5xB7iaB91Qjypvz6hUsu+k3tv/agU2p BekK5ROoADBk810OE/WSXvInCc1QiGUpdcQeu7M= X-Received: by 2002:a05:6a00:1950:b0:64f:52c9:ddd5 with SMTP id s16-20020a056a00195000b0064f52c9ddd5mr24639023pfk.34.1687458572689; Thu, 22 Jun 2023 11:29:32 -0700 (PDT) MIME-Version: 1.0 References: <20230620145338.1300897-1-dhowells@redhat.com> <20230620145338.1300897-2-dhowells@redhat.com> <20230622111234.23aadd87@kernel.org> In-Reply-To: <20230622111234.23aadd87@kernel.org> From: Alexander Duyck Date: Thu, 22 Jun 2023 11:28:56 -0700 Message-ID: Subject: Re: [PATCH net-next v3 01/18] net: Copy slab data for sendmsg(MSG_SPLICE_PAGES) To: Jakub Kicinski Cc: David Howells , netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Menglong Dong Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 22, 2023 at 11:12=E2=80=AFAM Jakub Kicinski w= rote: > > 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 cont= ains > > some data that's resident in the slab, copy it rather than returning EI= O. > > 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 iscs= i, > > 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 pre= vent > > 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.