Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3266102imw; Mon, 11 Jul 2022 05:30:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vuCfXJvYyArG3x7vQCD74jy0TE92c5hogQSrZa7aMYnnbVYtLTPyd0FC3x+JnMUUGZ1FgW X-Received: by 2002:a65:6907:0:b0:415:c9c1:eb4f with SMTP id s7-20020a656907000000b00415c9c1eb4fmr12285430pgq.193.1657542613752; Mon, 11 Jul 2022 05:30:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657542613; cv=none; d=google.com; s=arc-20160816; b=B4UZibMrlCja7XbZOgp5ZHAgKak3rzDhoSGY7EfSM9vGDBOwH3WQlApCICfwqlDKPq CJh796V/saGJO/TbCN9PwWelFyTe5BzGh1Fd1k3HXo8wQ3iOyBfB5lmZ1lZ+5pQRM9bX 3+PsBBX6FCsk/t8desJ7XUmxxHSQzJBpqWbns5qa+5/u1UO3VErdgM1lnWXQlf4x/cYc MCTys1XF4tFr8LKKeuPsuucCb/jBuVddUgCspQ13EecgH2Z187yEu7RfAH/gWaZVthAQ KefGSlHwaAL0g2OiEbSS0357w0KYj8EOs5lY/LkSiPQt0gt3i73TZICAQZy1ehGyeAsw /n+g== 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=iYcatKEW+q5bW/vlzXGidwV/BBFqHQS6h0HqRIuS6jU=; b=y1E2reGL6FmJpIdkaphzhYJfmkyrDPp6Wug2X9Byu1HQ/sNjzuTDsMO9VlIREIF/3O bZiauZupwlcJ/ncGYIYlP/vQJxfoTfGyK2jUO6eyXOgR3zFOcbSOWDTH3RoAlt2j75xz Vz2dO/3W+y0B292Zb5+2iE5niWNk2dwpVrpJs0CJYrZKHmjVvPCWYzofAT7fclajHNwl cVUWNdPA5FrO6hO9/uXqxHQyjFCxvhJjZInxkwttWCVrPsI3j8ET6GX2q6wm/XJtcM5O LqLBH4icINMk4zyN7Hw2ur4q2271ovj1gE8tF1h3tcKqYbAGXMm2HUweVx60vWvfEJUz MVCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=DN4t8sIu; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020aa7960c000000b004fa3a8dff9dsi8497301pfg.84.2022.07.11.05.29.58; Mon, 11 Jul 2022 05:30:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=DN4t8sIu; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229905AbiGKL5Z (ORCPT + 99 others); Mon, 11 Jul 2022 07:57:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiGKL5W (ORCPT ); Mon, 11 Jul 2022 07:57:22 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB58132B89 for ; Mon, 11 Jul 2022 04:57:21 -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 7ACDF20218; Mon, 11 Jul 2022 11:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1657540640; 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=iYcatKEW+q5bW/vlzXGidwV/BBFqHQS6h0HqRIuS6jU=; b=DN4t8sIucnIOzugkoQH9rK/FPjuKnU0HeQ/OfnRMiFpDY6Vm1Pe39PbJZ6EbIz+HhEkK9r 4O6vXhLEkPs+XVMuJ6vrBdXEMTA5ee7WxGTb5Rr6YImIm+IZeGWLpJv2/EfOpyUXgNYssF 889jYDZomWzNMIfuIM99JGYKagE1xQk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1657540640; 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=iYcatKEW+q5bW/vlzXGidwV/BBFqHQS6h0HqRIuS6jU=; b=536qo3gCx/uMV19ozGqyCwKX69wdlnOTYQwDsbWS+Zx9FS29sxJ/DNHIzUpp8wVae7jgBF TSWbsCyCW2379bBQ== 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 4A15913524; Mon, 11 Jul 2022 11:57:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Vm8CESAQzGJFAwAAMHmgww (envelope-from ); Mon, 11 Jul 2022 11:57:20 +0000 Date: Mon, 11 Jul 2022 13:57:18 +0200 From: Oscar Salvador To: Huang Ying Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Baolin Wang , Zi Yan , Yang Shi Subject: Re: [PATCH -V2 2/7] migrate_pages(): remove unnecessary list_safe_reset_next() Message-ID: References: <20220711084948.274787-1-ying.huang@intel.com> <20220711084948.274787-3-ying.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220711084948.274787-3-ying.huang@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, Jul 11, 2022 at 04:49:43PM +0800, Huang Ying wrote: > Before commit b5bade978e9b ("mm: migrate: fix the return value of > migrate_pages()"), the tail pages of THP will be put in the "from" > list directly. So one of the loop cursors (page2) needs to be reset, > as is done in try_split_thp() via list_safe_reset_next(). But after > the commit, the tail pages of THP will be put in a dedicated > list (thp_split_pages). That is, the "from" list will not be changed > during splitting. So, it's unnecessary to call list_safe_reset_next() > anymore. > > This is a code cleanup, no functionality changes are expected. > > Signed-off-by: "Huang, Ying" > Reviewed-by: Baolin Wang > Cc: Zi Yan > Cc: Yang Shi Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs