Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11352812rwd; Thu, 22 Jun 2023 12:04:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VUUoqJnz8OoNCSrM+bcMcqJ2QoZDcX/X6Fq3WJRlwmYRcrCTLNMH8uTszFJY5haXtqZIA X-Received: by 2002:a05:6a00:301c:b0:655:89f1:2db3 with SMTP id ay28-20020a056a00301c00b0065589f12db3mr37129600pfb.3.1687460693669; Thu, 22 Jun 2023 12:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687460693; cv=none; d=google.com; s=arc-20160816; b=G8tc0ei7ZsPq0KzwbUd9zrwIRnmLhDSPc6C3NYjX4HkVEhylN/1CoUNhWJI+oxiAEj mComslhVzNOGSpa8bfsVwaSFPntrX8GGlCClpTZfop5i6EFaZDBxunYyNNJatBndqyix uUQ27YJk1PzS+cymAKYDC/VhPZdtCui+SZrSWoEgvArmBTfYFhqrqcbmlp03jUiMUjqa QsnWL/BErPCce+r4YgHTafTgG0yWpfwKnkb0Lr/mBhtXz+Hsc1PnE/yN0xa4oZQre3pW 67dgGHyDtmHgn+IcLZSul5LjrT7mgGh3RX6nF6hZtmoELGVR3jolt/FQuWs+Aowom54X XDpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=2FL0yVfTPgNcBI0f+cgiGAWFHcCl4NqlE8bfEyyYjsE=; b=pZWJWc8rvYJ/GK9o4OlcMttju7gSHI2XuQu7bwBZAR/UmpVqsewgiR4YMbjNHkPMrx 3FpYPvBkdH/fX1ZVqnvh42QzC/1pcBsDopZ+KpInMZvYPe+mZ8uO2a669ViAuU4mb1oo hzwGMfN1dN/JCb+97KwjY8VU9ssEpdoBDvZuF1/EZYq29eDOaQT7G6T5+O/Pj7bQ7WhM FI3CghUr5piP0q11cd83wBZfrMtkzpqXQsxfBcCk10ImvNRHFxRX/vr7Y8oN8+o+E0Nj c0Du/aSrDFuIHY4ImlrIPJJrz553CPqgYtKgznmWnzko4qDp1ducaGUu5ejMGU7iLjRi 1/aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BeSVipOH; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p6-20020a625b06000000b00666acab17acsi502115pfb.318.2023.06.22.12.04.28; Thu, 22 Jun 2023 12:04:53 -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=@kernel.org header.s=k20201202 header.b=BeSVipOH; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231342AbjFVSMj (ORCPT + 99 others); Thu, 22 Jun 2023 14:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbjFVSMh (ORCPT ); Thu, 22 Jun 2023 14:12:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A4781FE9 for ; Thu, 22 Jun 2023 11:12:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A33EA618C7 for ; Thu, 22 Jun 2023 18:12:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CC78C433C0; Thu, 22 Jun 2023 18:12:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687457556; bh=3voyAzfGrtM2hCUsVSFe/G6QJ7KTcAlIITK7RFZZfKk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BeSVipOHf6K1iDWyC9PfTd5evoVvNx6BLxGjYl9ESPwCk6pcXDSthl6bbPTZnnL0b VXv0qbINbaiSoX/p+9wOB896WJXAjUn8YjSSpqD7wptnWW4RfiwEb5f6wp3SNt7P57 GZlotEkMT8/H74L2psL/S4TBDtoZo2rWPhj03RNDdNqSQP07K82JPXcrPJ+4xJEhNj L/WzvggSLLJXoez5lQ2dWdBCNHdGqCGcGsgq09v9QdJl+LwAU5fLNj6ssJ90V8E8fp VUbbxcWTSXfIk2s9GrHrW5NF7vtjQg0d4iD5LEByGfwOpFh8RaOUY+eObFoJMezyHa RzHjobdhmUiRg== Date: Thu, 22 Jun 2023 11:12:34 -0700 From: Jakub Kicinski To: David Howells Cc: netdev@vger.kernel.org, Alexander Duyck , "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 Subject: Re: [PATCH net-next v3 01/18] net: Copy slab data for sendmsg(MSG_SPLICE_PAGES) Message-ID: <20230622111234.23aadd87@kernel.org> In-Reply-To: <20230620145338.1300897-2-dhowells@redhat.com> References: <20230620145338.1300897-1-dhowells@redhat.com> <20230620145338.1300897-2-dhowells@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 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? > alloc_skb_frag() uses a separate folio for > each cpu and locks to the cpu whilst allocating, reenabling cpu migration > around folio allocation.