Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1868864lqp; Mon, 15 Apr 2024 23:13:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhaA+9T4nb4w/NELddNt4UTIvDiLK7hsckGbLG1xP/yCKbtz6vFnW7NMHBXcVIl2HPDHTxr6L9TgrjTTg2VCSJAD6bAajZ0kZwo8YsTw== X-Google-Smtp-Source: AGHT+IGKAiFLz5HY7ZOgso321Q1HRVkVAJHq1ttEXKqkffu4bI+7JpJT/E5IXlrEKpr5Ho+/j4Ap X-Received: by 2002:a17:906:b88e:b0:a53:ed46:f836 with SMTP id hb14-20020a170906b88e00b00a53ed46f836mr2271416ejb.2.1713248032667; Mon, 15 Apr 2024 23:13:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713248032; cv=pass; d=google.com; s=arc-20160816; b=G4wXIVsrB2r6Fxg1CnfkIC8F/VgHAqaaCLVXKQX9p1/7DyzFNXFe+bPDfid+iQu+k3 ZXskWtxrCKQGdMGPiF6oseOy3BogtT9WBCgP4/8h6QKfAMVCw2wXATRugxcJS/dYwjee MkTGH1BEyQ1kDJWYgWlF8gIpjj2603+z9qpBUItC20Kn0udahfdtXJ8pfeYR1yJljaNv eoGtl0OfrDRp/i30eYhikBUj5REvnOwBBwbNFtZTkGqnA7Bsmy16/rShNAUNbLxNqmys /Qm3vbxWOvWpa0bQy+iO5vy62azG+46TqSmtPzcKx4Y5GGQLiOZeERb1CKO3pXcDbPWJ WB+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CZ6ecSrVtYcanZSvOFQ1ox/50yBmtYgCGB61sRcLhXo=; fh=KJVBYP186zspsGQiEQoKbuaeYFMNW8ZkMA8Bhc90ulY=; b=V9qSooKBt/cgHG6HMrtv1NMgGffh4wgM9iRGO+vCQTUplDAZRPddxJcThD+wc9Xlk3 R9+zdGVO/2/QIPTUGbZihDq+8Z5M21oBDhMNd9RSX0Ij98IIo5HvPfDBxqjRJPXg5t2O sP42n5RhpFr6KkP1CcryHjx9+/ABG/emecGEwm/QSzEkyu2QD1jEYb+yQdIXmOgrdi4N 6UDw98OFxb2xagmujdGlU7Zkghr0G4xW5+I3Mv0QammRIaKRR8O47QTcSVq9exl0SL6a VKeRzlTD0EEtaqTG6SqJpltOK1b9Y+E6sL4zwzxeFsyYo8dB4WWY0EceJkSOXGcEJ+P3 qeJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fdsM2K5q; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-146320-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146320-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z8-20020a1709060ac800b00a52149ffdf1si5341372ejf.299.2024.04.15.23.13.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 23:13:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146320-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fdsM2K5q; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-146320-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146320-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5F18B1F21EB2 for ; Tue, 16 Apr 2024 06:13:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9753B3CF7E; Tue, 16 Apr 2024 06:13:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fdsM2K5q" Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81B7F33998; Tue, 16 Apr 2024 06:13:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713248021; cv=none; b=EVLkE8NIpK414Y/UEpiYV8iHSL4lVoLBlScSBB8wm/+8MY0KE0DK6CUMfg1bVbp8X6z6vxGpZ7gQxLaWmObLF7QyHi9/fg20jJkBEAGigDaoXviM2KISP4xvlrSWazfYOqqXnkPhEk1XMXyT7skIb/y+p7HMSclMINqzZ8t4yXU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713248021; c=relaxed/simple; bh=bJKfCh4TOpH4ZqKQgc6vvRE6Ro7oRSWDp+zAGLT1a74=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Wf2Z26xt7kgGh6NTzoVDGlS9uH44BefoGbjYDNvdw2uRzZHzBXpZ1zeylLI31v3nc46UYCYONGGVJNmw+XAr8Y05hBFvZ8Ai2V/issew6yP5Xw7WZRaRBcX2B8jNEK+EYJn1opem7wR5fH9d/2yNGjHmFCHPjByQnPN5omYzNJQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fdsM2K5q; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1e2b137d666so33056155ad.2; Mon, 15 Apr 2024 23:13:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713248020; x=1713852820; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CZ6ecSrVtYcanZSvOFQ1ox/50yBmtYgCGB61sRcLhXo=; b=fdsM2K5q1d5NqmKfVSr5Zu++NnUS7igDswII5gacwpVP/19zrFeC8+/uC3ja++3smF W8awc2ZgzFtzFDLI6hoLBmi2+mlJPKIzSaqGcKNnMkeFDJPnUgCRJu/vVAjJV4MLJ4X8 KA0ivhikQzyRbLgyY6vzWH47HLzHstNKWsM9bS8oVXjj7AdS32O1IQjnHZneywrLYPmP AmCcVYw5FfxxZ0dQLQAKxQKlfEIdJOTeIQ+e0MNDg2AMQi5zFdbt+QBwQdXLOB7cK4oO IV8DERD4+aZNRusi0VllyePy6A3em+tMnafq9XvV8IbNF5L4yrnZxE8+ua8Y58wsu6o6 xFrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713248020; x=1713852820; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CZ6ecSrVtYcanZSvOFQ1ox/50yBmtYgCGB61sRcLhXo=; b=gmwfgjQq8ZM4x6F/g5cBPbGafoTZrt7Cum4LGgNdI3l/7ziG9RmY//VNTEA5d6I0Ip W2HAWoZl9y65neEuMd32SGYQWJVx5UnF9b7R8ir9VaTp3KCpVsRDMBYyc3vhyU0N7sAu 3F92Ip7nU2/L/O3xis1ur4kdobl0k5ygO00bvBVBPrJ6Y7xQN4vamKrUHqKGcullYU+h igm17SkDDQo2pxq3BovsdQ4+/3TUlBsCpPES60dAW7fWKvTUz3wmBgO5jb6+bsFYnf8K 2HtcRYIVMQAdm+M2nQbSrbL/u4eU+WXo84UymSmJPhSvjCSNro3EjA+7DerXXHHMNSm/ YTuw== X-Forwarded-Encrypted: i=1; AJvYcCXux9UtvriFOgaFRp0wvOQqDWOEC18TEmhtsVZJjAUAUMIvoc/+lsY/bxCrPbd9FJAPe4pGGcPILQmMZgzOzxzCweJv+3E3afCSuHEsjtduafLsUlM5QNSmd+f4BD3zvhnzTnhjZjD/ X-Gm-Message-State: AOJu0YxxT6aEhRIdkhWCxqTJla5Vvf3TPs6si8mjbUbSJEcFmPdljSgJ dHn3DFfgruLURQFtXTzHMKTNX65ix9G71Wv2fI0k35/KpaGDMOq1 X-Received: by 2002:a17:903:24e:b0:1e2:7aba:6d0f with SMTP id j14-20020a170903024e00b001e27aba6d0fmr15871189plh.36.1713248019757; Mon, 15 Apr 2024 23:13:39 -0700 (PDT) Received: from archie.me ([103.124.138.155]) by smtp.gmail.com with ESMTPSA id n9-20020a170902d2c900b001e1071cf0bbsm8940249plc.302.2024.04.15.23.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 23:13:39 -0700 (PDT) Received: by archie.me (Postfix, from userid 1000) id A125A180F6DB9; Tue, 16 Apr 2024 13:13:36 +0700 (WIB) Date: Tue, 16 Apr 2024 13:13:35 +0700 From: Bagas Sanjaya To: Yunsheng Lin , davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Duyck , Jonathan Corbet , Andrew Morton , linux-mm@kvack.org, linux-doc@vger.kernel.org Subject: Re: [PATCH net-next v2 14/15] mm: page_frag: update documentation for page_frag Message-ID: References: <20240415131941.51153-1-linyunsheng@huawei.com> <20240415131941.51153-15-linyunsheng@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0I6/Ma35WnVqMhhN" Content-Disposition: inline In-Reply-To: <20240415131941.51153-15-linyunsheng@huawei.com> --0I6/Ma35WnVqMhhN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 15, 2024 at 09:19:39PM +0800, Yunsheng Lin wrote: > +API interface > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +As the design and implementation of page_frag API, the allocation side d= oes not "... implies, the allocation side .= =2E." > +allow concurrent calling, it is assumed that the caller must ensure ther= e is not "... . Instead, it is assumed that ...: > +concurrent alloc calling to the same page_frag_cache instance by using i= t's own "... by using i= ts own ..." > +lock or rely on some lockless guarantee like NAPI softirq. > + > +Depending on different use cases, callers expecting to deal with va, pag= e or > +both va and page for them may call page_frag_alloc_va*, page_frag_alloc_= pg*, > +or page_frag_alloc* API accordingly. > + > +There is also a use case that need minimum memory in order for forward > +progressing, but can do better if there is more memory available. Introd= uce Did you mean "... but more performant if more memory is available"? > +page_frag_alloc_prepare() and page_frag_alloc_commit() related API, the = caller s/Introduce/Using/ > +requests the minimum memory it need and the prepare API will return the = maximum > +size of the fragment returned, caller need to report back to the page_fr= ag core "The caller needs to either call the comm= it API ..." > +how much memory it actually use by calling commit API, or not calling th= e commit "... to report how much memory it actually uses ..." > +API if deciding to not use any memory. "... or not do so if deciding to not use any memory." Thanks. --=20 An old man doll... just what I always wanted! - Clara --0I6/Ma35WnVqMhhN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCZh4XCwAKCRD2uYlJVVFO o85iAP0UEZ96bTaKdZC0FmSard5z0dMjRBPD69wzKG6rmE9CagD+LpsBRsgW1frt 81TmfyhS9gzn/HY0KhWP63uiPguKkQY= =zrUk -----END PGP SIGNATURE----- --0I6/Ma35WnVqMhhN--