Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp977474iob; Fri, 13 May 2022 18:20:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaBla0qXbY9Bx67pwanQcd5uMVCYPR5Ct0wRhi8s1SIxB4i2QrBcY68nMOf0G/C1xF5lrN X-Received: by 2002:a7b:cbc2:0:b0:388:faec:2036 with SMTP id n2-20020a7bcbc2000000b00388faec2036mr6982287wmi.190.1652491238386; Fri, 13 May 2022 18:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652491238; cv=none; d=google.com; s=arc-20160816; b=W6wspwYHw0ZxYLxqdWovccob4q0/GgWWSJ8a2bT/UqXH0MMK29wy/rqpF5rzmN8mwd 8/UoYPzcilufRPgcUesyzCgGARsuDU7e3KtrKzVpdnRHxIgJy/c98U3Yrai4fYcua67K OGnPq/DurvOwjEK7bKbRc+Vme/HYTeDnThMr5P6j2NKmfyXJfVJ2yzDXcccYd0A8DJ4p Qgrnn2BBNpV8Gs32R+lFNMYSs+lDk2aSh2guXLyX00bt5xKKZHgNDrKxyRUzM07Ir0qe Lr2i3lHF3d4g7CTlqXDGUhCuu3GuCAXQDvaSDZQ82UO8nlb8GwcWrl7ZqmdiTSREF4vg MBWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=/ijA/xgUqWRx9xio/21UMMT78f/5jHH4GV/QBK+sDxA=; b=Z7R8DkVPZflNthre05dGmPz8jpD/unClPm693hSAxthA664ya+PYuf8fOFZeULH1N+ o+x2f2XCGwcqpoY9/hJVf8th+YHmuROaNvbQxBz6H3WUY666tsy0maa2EqnI2sAsqlYL +gvvgpNppqn0LXNhH5zQRQXaAYgoUERbTDgZbcOgi+3Mr6eIY4Nt6VwIhsswRDmgYI7q E2wQomqeMvpW+N8AAeOpN/euQAXLr2ER6Pzv/Kcf/aodDr77wqbq2EZwlNI9Gfy8R283 VCmvr0Lqd8cl9Xo031i2aMqFB+Yo74xL4knw+p/6iqTAie8zCrdB7h/rIpOd6vUe4D/1 f3Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vJsHBr8s; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=Dl0MBN8r; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w5-20020a5d4045000000b0020acee51a32si3202516wrp.923.2022.05.13.18.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:20:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vJsHBr8s; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=Dl0MBN8r; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5AD143C5B36; Fri, 13 May 2022 16:50:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377937AbiEMHyw (ORCPT + 99 others); Fri, 13 May 2022 03:54:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377854AbiEMHyt (ORCPT ); Fri, 13 May 2022 03:54:49 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 284B515A3EF for ; Fri, 13 May 2022 00:54:47 -0700 (PDT) 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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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