Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2179082rbb; Tue, 27 Feb 2024 13:16:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWJkY1+g3JxWq18GkTcT+x7OQSiLdMqE3ezSY/JpNXlyYnGGBnSQzFAIsV0lpXPt3TQpKU6WsI2d2knCaD3Yudhh2DpBkihxziazpCbgw== X-Google-Smtp-Source: AGHT+IFM4JqMieCD8gThY42AJzifgxuI5GQ/J4E2Hhp2RQmGaYwx7zzWWoP2kusslQDBgkVxAYPv X-Received: by 2002:a05:6602:14c7:b0:7c7:e2c5:569e with SMTP id b7-20020a05660214c700b007c7e2c5569emr4188368iow.7.1709068601293; Tue, 27 Feb 2024 13:16:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709068601; cv=pass; d=google.com; s=arc-20160816; b=UFvKFGDn8PJV/J/RMuJYE1PpLIlwJG797gJlC2FuxPmGzvawcDPZ8aHNmYSd7SnOye ttGfXgidNTz1At5XlEiRnR4yTbNOIjKsPQyDg3Y4jgnfLY+yXJPVQ/JKzhIP4CtqnKDZ Ep0l9+14nZRpPsBkfqm3w8r1ya1MkGUWAO+AF/XWjI7eP9brfGqIsFUEanbOuDOGyHmU Go6RQLHyUVjO2JeWuRWWpRwaSP8Boqz2yj1Y6SlYslrQgylc4QK7Cc4MVLLGqr4ze3At DYimapkbW94SF5u9mnRoG/qGn2co4ZLYmbslLXSEwmCJwRbt7IsTFm5AIH00Rh8R+Nvg cTwA== 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=CuJB5bRBJbOy4In+KKiCZi5akTRyl9NVfEAfw816xy4=; fh=YYm5DTdIk0T238BHr/D+DtOd3AE3mzcyZQeoOyHmoXk=; b=Yu42usMy2WUKb0WnEHCYsAu4XXJDlGmerYE+XQj2N4omrG1MYn4g4kytJtuUcC55gD oahpbE/IC+grlfWZXfhApQYHTwUmR8L2iwA3C/GGYuFetaqHiue/tK5ypXJ+OQrY8oya J/fogeuMJ7bbU6/y5H50zolJXyaKTvs3FAF4O5Sw6yHAevD8lL491dC3AQk6sEtVilX6 0aOgnC2OABw7NMRrjMw2QIXAhr2PYPlVLU3j1qlOuFl7bkDHFBKjGjeFgxoTvt6dULzY M2MeirTvZaeTAdBaPnkS/xeBLzZThkuuiFIZUlJoa+i3e1QNOySRUCRq3nNULLtB4Izj wfQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=KqpHDucB; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-83560-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83560-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z9-20020aa78889000000b006e4eebbbf62si6026604pfe.393.2024.02.27.13.16.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 13:16:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83560-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=KqpHDucB; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-83560-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83560-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 18D0A282DF1 for ; Tue, 27 Feb 2024 16:00:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3193F146912; Tue, 27 Feb 2024 16:00:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KqpHDucB" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8FEE535AE for ; Tue, 27 Feb 2024 16:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709049621; cv=none; b=NPFxqP3GAi/s3awH06rsCCeUsCe46VStnPuBzBw/1FbqT5bmjXnwTczLRdKtQYQTAVNEcxlk9tXvHo27lbAxeTaKWiMn11tqubgMRG23YGV6Ba1rWh+AisZk3IhHxA6ksGmLDq1uNSjP+r8wfnmfopmqPue8AGK6OByrWs9jd30= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709049621; c=relaxed/simple; bh=/ZcKHB3se7dZ04rBs98kiLqPFcRbaht4NCHpVlNlawI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lUgk5Jf4yAStEu0UMDHI2b4cfSfq/ufWG8m9R9i5t0Lg1NAqI+6QHLhqTA3pPok5e5QCIUMrXeH/M3ulWbHXg/oSWlB9P8+mlQIO32Rg83jQf/PxN+Elz5fUlG6e8rXTKUN+279TonUHVWp4PPh5Ywjr5yLcHWxxuFqjJBPDLg0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=KqpHDucB; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=CuJB5bRBJbOy4In+KKiCZi5akTRyl9NVfEAfw816xy4=; b=KqpHDucBRg5Iv9IKONlQDUmmIM NTRyFQtftMfeOC0U1oENORYEroE+VVuyz/8hcWrZl4Bx0JyDioMkktPp3WzKojAvOv9335Wo772Bz uefvIc6c0w/grkBdW+Z03XO9A4ZguEhzaM7MLmY6PgcDv/UmTwl5UWywzVMTJ7qM79ZjUfRxUON63 5tpxRgb81hq1YYpXiAIaz9Qss0A0oPFyd9b7+U3vcyKFdrOitsYeDX9wOMlgeqwgXmgwc+dFVMARW yzmPSUW2rC1VYqoU77sSzHjJT/2+juunQbH1ojNBFtTXXmQxMdKC3Q3Gt9JVWNf3994BuHcyhIMkr 3wXQm3rQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rezsQ-00000005tJI-0eyv; Tue, 27 Feb 2024 16:00:18 +0000 Date: Tue, 27 Feb 2024 08:00:18 -0800 From: Christoph Hellwig To: Barry Song <21cnbao@gmail.com> Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Barry Song , Lance Yang , Ryan Roberts , David Hildenbrand , Yin Fengwei Subject: Re: [PATCH] mm: export folio_pte_batch as a couple of modules might need it Message-ID: References: <20240227024050.244567-1-21cnbao@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240227024050.244567-1-21cnbao@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Tue, Feb 27, 2024 at 03:40:50PM +1300, Barry Song wrote: > From: Barry Song > > madvise and some others might need folio_pte_batch to check if a range > of PTEs are completely mapped to a large folio with contiguous physcial > addresses. Let's export it for others to use. It doesn't look exported to me in the patch (and that's a good thing!). But even for making it non-static you probably want to include that in the series actually making use of it. > +extern int folio_pte_batch(struct folio *folio, unsigned long addr, > + pte_t *start_ptep, pte_t pte, int max_nr, fpb_t flags, > + bool *any_writable); no need for the extern here.