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 87972C433EF for ; Fri, 13 May 2022 07:54:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F31166B0073; Fri, 13 May 2022 03:54:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EE1796B0075; Fri, 13 May 2022 03:54:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA94A8D0001; Fri, 13 May 2022 03:54:48 -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 C74D36B0073 for ; Fri, 13 May 2022 03:54:48 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 883301209EB for ; Fri, 13 May 2022 07:54:48 +0000 (UTC) X-FDA: 79459958256.14.83BCD64 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf03.hostedemail.com (Postfix) with ESMTP id 89B7B2009B for ; Fri, 13 May 2022 07:54:39 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 968321F921; Fri, 13 May 2022 07:54:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1652428486; 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=/ijA/xgUqWRx9xio/21UMMT78f/5jHH4GV/QBK+sDxA=; b=vJsHBr8spZUeBnqTnlnQEs2fzM4UELF4AYVTTmJNTTUeHfft1353smZmjErICScE/YSm56 4mPO4lhVty6ta0wtcjQp99X70RgrN/8YRzGM1LeoEGyYwgj3l1UtbMTD5LTvbWIjIJUPCx YQ6Dx/WYhjuUNPAFL0B1TN342lXY0d4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1652428486; 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=/ijA/xgUqWRx9xio/21UMMT78f/5jHH4GV/QBK+sDxA=; b=Dl0MBN8rxb0aLplV+2u+DRxg8KKDUplMi9D2gIRw/v5UVYlt8h6wSrVlWqx9df4ssTshhS B5l++1SXAOpmvJCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BE19E13A84; Fri, 13 May 2022 07:54:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id cUtcK8UOfmJFTwAAMHmgww (envelope-from ); Fri, 13 May 2022 07:54:45 +0000 Date: Fri, 13 May 2022 09:54:44 +0200 From: Oscar Salvador To: Rei Yamamoto Cc: akpm@linux-foundation.org, mgorman@techsingularity.net, vvghjk1234@gmail.com, aquini@redhat.com, ddutile@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm, compaction: fast_find_migrateblock() should return pfn in the target zone Message-ID: References: <20220511044300.4069-1-yamamoto.rei@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220511044300.4069-1-yamamoto.rei@jp.fujitsu.com> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 89B7B2009B X-Stat-Signature: 6m44taycykqq7rh6n9e4kcmpm9pa68wo Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=vJsHBr8s; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Dl0MBN8r; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf03.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=osalvador@suse.de X-Rspam-User: X-HE-Tag: 1652428479-110279 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 Wed, May 11, 2022 at 01:43:00PM +0900, Rei Yamamoto wrote: > Prevent returning a pfn outside the target zone in case that not > aligned with pageblock boundary. > Otherwise isolate_migratepages_block() would handle pages not in > the target zone. > > Signed-off-by: Rei Yamamoto Reviewed-by: Oscar Salvador > --- > mm/compaction.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mm/compaction.c b/mm/compaction.c > index fe915db6149b..de42b8e48758 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -1858,6 +1858,8 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc) > > update_fast_start_pfn(cc, free_pfn); > pfn = pageblock_start_pfn(free_pfn); > + if (pfn < cc->zone->zone_start_pfn) > + pfn = cc->zone->zone_start_pfn; > cc->fast_search_fail = 0; > found_block = true; > set_pageblock_skip(freepage); > -- > 2.27.0 > > -- Oscar Salvador SUSE Labs