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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 771FDC433EF for ; Mon, 11 Jul 2022 11:57:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbiGKL5Z (ORCPT ); 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> 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