From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE414C7EE2D for ; Wed, 24 May 2023 19:16:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3ED7A6B007E; Wed, 24 May 2023 15:16:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 34AA5900003; Wed, 24 May 2023 15:16:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C3F6900002; Wed, 24 May 2023 15:16:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 0918D6B007E for ; Wed, 24 May 2023 15:16:14 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3CA1CC0A43 for ; Wed, 24 May 2023 19:16:13 +0000 (UTC) X-FDA: 80826104226.17.7D1D5F4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id 7B632140021 for ; Wed, 24 May 2023 19:16:11 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UdOk8ktR; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684955771; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=he3SIPP3J4cNBA2pRGcMEKCCfNpR592ARXGBjlsSER4=; b=Kq3eM6YN71HJGEdgBjPN9VEsuxcpm4y9AB1XnENwMwT8i/jsIbGaUEnNW5LrnOdETFZHYP KGM8+VmstHNeoRss9cBpZ08BQyvohSGbxXiBpr4WT+QB9rv0UBOXjawYUSG+AR6PI/aqcB u16tQrNixmJE9+j525m4uKKIgK2qJhQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684955771; a=rsa-sha256; cv=none; b=r4cEph0wF+t2Hz1GVNyt7jMC1rL4vFoDQFyk469n+aAdFK5GOjBQ2zbxdsvYMwi5hsAMW6 lN/SX6nUVgZh+92QiNsof6gcBj1y0X2pCJZtozOjOjVxl2HHQcta6iunraZq83ynVp9/pv FYOdhrVuSRWARQfVysnHviroVi90EWQ= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UdOk8ktR; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 714B963DDC; Wed, 24 May 2023 19:16:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3C75C4339B; Wed, 24 May 2023 19:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684955769; bh=4mFWjvJ+t1kSPCQ+e4sFDTvSwcTu1Vk+zaiSOpA9zes=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UdOk8ktRA7imVgBv39lMLCuKeq676Uwm7qBwKZ7BVB6XwTU6VH0cCnIbUJXw1O7C0 qMjEPdaTmBUVaZPJT4+uvgpVe1pmq2x9vxEppccPJqxfWxEtDsdifumefUaVAS7U4Y v/2G2mQrg7oopC04Vv7E/CIr7GKzE8fDt0XRgnYvkXQW6cHqqVFQUBejKBVpWp6bZk ixcsF3T6Tii9Ij1GDKhTxRAI8E0QzrKx/f1Hs/seVqpSzjf3TInUP1sB8q+prHF0uq tG0Q4LpFewo7MKG9rPj8sLy/B/l40HPAGnpZvdMrdwNhSMVFaSrsaQBbccKcmJSEgM ph9WRDRgDvF8w== Date: Wed, 24 May 2023 22:15:49 +0300 From: Mike Rapoport To: Johannes Weiner Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] mm: page_isolation: write proper kerneldoc Message-ID: <20230524191549.GS4967@kernel.org> References: <20230519111652.40658-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230519111652.40658-1-hannes@cmpxchg.org> X-Rspamd-Queue-Id: 7B632140021 X-Rspam-User: X-Stat-Signature: 48ktc96wpek4hrq341ypx6j3a4nxgqwb X-Rspamd-Server: rspam03 X-HE-Tag: 1684955771-2011 X-HE-Meta: U2FsdGVkX19fZ35Q7PnmXLcgNwLrFw56htZnGI61xjFELiI7arBoNYky1XkOTmrkWV/PbKWW54OmGv4niurLHJiKzMoWqdXGloeVmEoTd1y9hdmsSM6/7lhhWjoqqVR33vsqFDIolw6RgeGHfQyZmn3QgOgM8Oi2ExcLg3QB/oSlqGF4wGSRyXJCZDlCtdJHK+Fu2AK4fxyA0wdZgj/ktZyLyo2CBmmVFh3/iL4OjaV0RsWnymUc1m9wqmtqe8UR12Yfd/yAZNCB6i+9eHJSGkMNA5ZQl3uY5mEn9tfx7IIQCjZ9ritxO4WjllY1EtYfSC92Gj751jEoui4f+iFYloKX7V9aAnMi/seKHGD0jMrfi0AqinvD9VaRvTz69dp9fyc7px5FOju54enLh+azAu/dqbz96RrxP49NrpQFmUXAAUpUEMgZ/uc+r8vZJKspogMlSeRGioLysOJCcMx4BW7cY+8MhEI9yYKqvP4DC9ZzpfO+nQH28mFCIRNz96rZwA5vqoWy06rdOeY2Ons++1csDuw7UM38QO3VHRaxG4fWzCviidPoftsoB9w38EPQNi1LfQOHqdtb/IIYIhuvPDYS31IHhQLbq9Uq/grCcupebcBtgd5JqAl71tOk2+mEVE4yDJID9Dj+rmTAK8tmbYMqDM3C8SDkJQ8pr6BpFmJTagzxnN/9fNLLOwWqkvvRtgu5VIbjuXkXdje5I0cgtGdir+ipZ2dBkWUkHtM6R0Km3aKZmFv65uXjksXPV8mJd6jumD4PVRGy4bsYzMVhHOvv9glsep4eQSNc+Q8IIeCizEvvd+1X+u8hmvLt3yNfFzUoSjOYxjZOl2NFg/s0jNtOhpEsNW4Eq9MMaHqxFCMPxBKxO3v+dJpQE83i+mal1urkeWx6PiAR94RAT1/kYcIMb9qc2JPpbVUarYg2UBZM74qvLBUPPh1V9R9myoJWr306oglnDqf8swtYnoP XwZai8Yb CwGR7gvvxAKI/Bs5PRCW1T9IupCLTTV7PT7Bud4+ieKaj/3ZNsfpT28DzpZ4wuVYW53/k/H7kWYqJQun+PNR2xtN9g1QPvjkRYHj/hHaLpwO5oerK/wXjmzT6WQIWfsy981Mt5BXv6ttL5mWewPzJqGg49SADqARsG2g/99QOIHFBRKQdWC5+ybKHdlNxXJmilmHPUpYawzUssqB0l5cD2l6zpkd7VP1zLrZFlEedlFK24lAm+UFy0Z2m4W21cpgQZ0UV9+ttsgIm+bXZvBmSus30ePKIn9/a6ZdO4UO3L8sawsIhJkWyTeiOJOQDVGxF6ZBzyO9aZyS/GxuTA96HUis8E9nVx/ReBuJeiHnCCbaBX3jpX3nHXT4tvCqrILGTdWJGS/AyqrIx56Q= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, May 19, 2023 at 01:16:52PM +0200, Johannes Weiner wrote: > And remove the incorrect header comments. > > Signed-off-by: Johannes Weiner > --- > include/linux/page-isolation.h | 24 ++++++------------------ > mm/page_isolation.c | 29 ++++++++++++++++++++++++----- > 2 files changed, 30 insertions(+), 23 deletions(-) > > diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h > index 5456b7be38ae..0ab089e89db4 100644 > --- a/include/linux/page-isolation.h > +++ b/include/linux/page-isolation.h > @@ -37,24 +37,12 @@ void set_pageblock_migratetype(struct page *page, int migratetype); > int move_freepages_block(struct zone *zone, struct page *page, > int migratetype, int *num_movable); > > -/* > - * Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE. > - */ > -int > -start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, > - int migratetype, int flags, gfp_t gfp_flags); > - > -/* > - * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE. > - * target range is [start_pfn, end_pfn) > - */ > -void > -undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, > - int migratetype); > - > -/* > - * Test all pages in [start_pfn, end_pfn) are isolated or not. > - */ > +int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, > + int migratetype, int flags, gfp_t gfp_flags); > + > +void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, > + int migratetype); > + > int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn, > int isol_flags); > > diff --git a/mm/page_isolation.c b/mm/page_isolation.c > index c6f3605e37ab..e7d7685104de 100644 > --- a/mm/page_isolation.c > +++ b/mm/page_isolation.c > @@ -481,8 +481,7 @@ static int isolate_single_pageblock(unsigned long boundary_pfn, int flags, > } > > /** > - * start_isolate_page_range() - make page-allocation-type of range of pages to > - * be MIGRATE_ISOLATE. > + * start_isolate_page_range() - mark page range MIGRATE_ISOLATE > * @start_pfn: The lower PFN of the range to be isolated. > * @end_pfn: The upper PFN of the range to be isolated. I don't remember seeing lower and upper to describe memory ranges in our docs. Do you mind changing these to first/last? > * @migratetype: Migrate type to set in error recovery. > @@ -571,8 +570,14 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, > return 0; > } > > -/* > - * Make isolated pages available again. > +/** > + * undo_isolate_page_range - undo effects of start_isolate_page_range() > + * @start_pfn: The lower PFN of the isolated range > + * @end_pfn: The upper PFN of the isolated range Here as well > + * @migratetype: New migrate type to set on the range > + * > + * This finds every MIGRATE_ISOLATE page block in the given range > + * and switches it to @migratetype. > */ > void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, > int migratetype) > @@ -631,7 +636,21 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn, > return pfn; > } > > -/* Caller should ensure that requested range is in a single zone */ > +/** > + * test_pages_isolated - check if pageblocks in range are isolated > + * @start_pfn: The first PFN of the isolated range > + * @end_pfn: The first PFN *after* the isolated range > + * @isol_flags: Testing mode flags > + * > + * This tests if all in the specified range are free. > + * > + * If %MEMORY_OFFLINE is specified in @flags, it will consider > + * poisoned and offlined pages free as well. > + * > + * Caller must ensure the requested range doesn't span zones. > + * > + * Returns 0 if true, -EBUSY if one or more pages are in use. > + */ > int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn, > int isol_flags) > { > -- > 2.40.0 > > -- Sincerely yours, Mike.