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 X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD228C433E0 for ; Thu, 18 Mar 2021 11:36:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2948164E99 for ; Thu, 18 Mar 2021 11:36:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2948164E99 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9DE916B0070; Thu, 18 Mar 2021 07:36:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 98E226B0071; Thu, 18 Mar 2021 07:36:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 81AA46B0072; Thu, 18 Mar 2021 07:36:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 647D56B0070 for ; Thu, 18 Mar 2021 07:36:55 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 153E12C8F for ; Thu, 18 Mar 2021 11:36:55 +0000 (UTC) X-FDA: 77932793190.29.E889D99 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf29.hostedemail.com (Postfix) with ESMTP id 63C09E4 for ; Thu, 18 Mar 2021 11:36:54 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1616067413; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=24G/r1E30AsZUF/AX2sBqmyTAaBuuLlWiniW9BDlFVY=; b=dK4ZcYlITSWaT2BhBlATmz41BctAGbnEt7bb2lrk4k2Pi1sG4x1nDELIBTGwIFzWYR1u2/ NmdwTs/JeEoCjoLsU41oGDNrn4cZHZ7uZ3K4iuFo5nyGB5fW9ZN6JT5B1L1QjK+99vntkM Lr/GO3lVtGgbsog/+1sOMPyxI3mFQeg= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0CF08AC75; Thu, 18 Mar 2021 11:36:53 +0000 (UTC) Date: Thu, 18 Mar 2021 12:36:52 +0100 From: Michal Hocko To: Vlastimil Babka Cc: Oscar Salvador , Andrew Morton , David Hildenbrand , Muchun Song , Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/5] mm,compaction: Let isolate_migratepages_{range,block} return error codes Message-ID: References: <20210317111251.17808-1-osalvador@suse.de> <20210317111251.17808-3-osalvador@suse.de> <20210317143827.GA20965@linux> <843f68e7-6fe6-54e7-976b-af8647482ac1@suse.cz> <5b294e86-e6a4-71ea-6a7e-1a611c6ccccf@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5b294e86-e6a4-71ea-6a7e-1a611c6ccccf@suse.cz> X-Stat-Signature: 638to9uestes777nft5dw4mqzydginw6 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 63C09E4 Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf29; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616067414-562094 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 Thu 18-03-21 12:10:14, Vlastimil Babka wrote: > On 3/18/21 11:22 AM, Michal Hocko wrote: [...] > > E.g. something like the following > > diff --git a/mm/internal.h b/mm/internal.h > > index 1432feec62df..6c5a9066adf0 100644 > > --- a/mm/internal.h > > +++ b/mm/internal.h > > @@ -225,7 +225,13 @@ struct compact_control { > > unsigned int nr_freepages; /* Number of isolated free pages */ > > unsigned int nr_migratepages; /* Number of pages to migrate */ > > unsigned long free_pfn; /* isolate_freepages search base */ > > - unsigned long migrate_pfn; /* isolate_migratepages search base */ > > + unsigned long migrate_pfn; /* Acts as an in/out parameter to page > > + * isolation. > > + * isolate_migratepages uses it as a search base. > > + * isolate_migratepages_block will update the > > + * value the next pfn after the last isolated > > + * one. > > + */ > > Fair enough. I would even stop pretending we might cram something useful in the > rest of the line, and move all the comments to blocks before the variables. > There might be more of them that would deserve more thorough description. Yeah, makes sense. I am not a fan of the above form of documentation. Btw. maybe renaming the field would be even better, both from the intention and review all existing users. I would go with pfn_iter or something that wouldn't make it sound like migration specific. -- Michal Hocko SUSE Labs