Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3452578ybl; Tue, 21 Jan 2020 00:44:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyg6Nigudf2m40hPDNcSOMJHKPAdigpiOOogIgFC6VNckG61OnhEJOzGLxGEVZXDvVyo361 X-Received: by 2002:a9d:4d8d:: with SMTP id u13mr2727456otk.299.1579596299583; Tue, 21 Jan 2020 00:44:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579596299; cv=none; d=google.com; s=arc-20160816; b=omYRrQIY0K75ylEOkwuDvmcpmZLoRHwVX6P/4pBkrV6AMHwovgDdmE/PqiYF7TuODT veFcY68B4UNJcbBcwJGskyApxMmfiSpd7x9BcYrW1X1CfMN86upvCSqLXBA/T9tnEcj3 JSTHOwnal2ZW5atC5GcY1fOxpEPQ4E+/sPOnfTDA1MzZ90wQKNGyZ3mE5WDVFz49BDoB L7LmTYLY/V7SjTexkwjfgbKEZ+RQqNnnAQuHEZAls9Uo4b1lzlBxVEHK+R56G814Ai2X e2mOYMKfPBuk6EohsIWYesO2/J5/2EmOu+o7rqp8MlaHsrf3cng5UI8q3tm17yU8tS5u qAog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=p1miCEumvBZXojM3ziPoJ3SDCJDQgzFEnuJYN1G9228=; b=pPvZXvhhYcqoCjZgQDQPR7jBm4Z/ozF/BPiHO2tKsaI59FCiKYKKwMQyjdxTAppZ5R /8UjZUuCWOq/vc7L5i2487jnp+k4L+cU2wN21cqr6s/5ZoKhpcmMJQMojGfCsIKdjxcv MUofHFXC5PO6uyo9Zc0FYn/jJbb+GJ95Z81NOeKnGibhNuqJ7RbMIb0afI6cQusuF6ZX n6JbZr6exsm2zgxdlO0xZ9oF2/7xZPPsPw3b1xqy0oPMFt1laGFr3ggLWLrOAfRnrn+n qlzdYjbsn5Hr0tG2A7fl7WUYo5mcNGqzL+dOrx3FiRfm1vJJlyn/N8fkVj/seq4n69TO FwPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e18si22173147oti.153.2020.01.21.00.44.47; Tue, 21 Jan 2020 00:44:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728811AbgAUIn4 (ORCPT + 99 others); Tue, 21 Jan 2020 03:43:56 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55924 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725890AbgAUInz (ORCPT ); Tue, 21 Jan 2020 03:43:55 -0500 Received: by mail-wm1-f68.google.com with SMTP id q9so1980690wmj.5 for ; Tue, 21 Jan 2020 00:43:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=p1miCEumvBZXojM3ziPoJ3SDCJDQgzFEnuJYN1G9228=; b=fF7Gyv8/ViMVTShqo9qPVGGQhybEemCNixYzXfmh85JISJULNs9YvXJ0PPXdfhHqpZ u3aUusff376J0BXfClQymutpd6SKPNLmkAAXqSUSnUPw6tQrK6KLDO2K6tLNivmp3dhv n7co4iT27o6KsrcFFogPULQafdGwSYGfSMdPxZVC+g1etlG+MW3qemUS1tz1zkWerscY c9W8cOcvZwsW5Eb2Os0+vCGsI3ZXYmaOe2M3b+RWf0H40JKJ8vU5VyjWZ34XIDtvDvcg sGmyWMT5OiF/0WYo5wHXg32uJf/8E+RqI3YdCObPhpg9YzNkzJQRUU6t5HQ4XapmYWNE 3h3g== X-Gm-Message-State: APjAAAW/PMmuXehjGSwXAMFZLIiU90sYr+uBCpMQHD9GoZOdlHiM4JwD cDLDqP50eovFKozAl/bx66Q= X-Received: by 2002:a1c:a50e:: with SMTP id o14mr3086072wme.2.1579596234154; Tue, 21 Jan 2020 00:43:54 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id f12sm3048208wmf.28.2020.01.21.00.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 00:43:53 -0800 (PST) Date: Tue, 21 Jan 2020 09:43:52 +0100 From: Michal Hocko To: Wei Yang Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, yang.shi@linux.alibaba.com Subject: Re: [PATCH 7/8] mm/migrate.c: move page on next iteration Message-ID: <20200121084352.GE29276@dhcp22.suse.cz> References: <20200119030636.11899-1-richardw.yang@linux.intel.com> <20200119030636.11899-8-richardw.yang@linux.intel.com> <20200120100203.GR18451@dhcp22.suse.cz> <20200121012200.GA1567@richard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200121012200.GA1567@richard> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 21-01-20 09:22:00, Wei Yang wrote: > On Mon, Jan 20, 2020 at 11:02:03AM +0100, Michal Hocko wrote: > >On Sun 19-01-20 11:06:35, Wei Yang wrote: > >> When page is not successfully queued for migration, we would move pages > >> on pagelist immediately. Actually, this could be done in the next > >> iteration by telling it we need some help. > >> > >> This patch adds a new variable need_move to be an indication. After > >> this, we only need to call move_pages_and_store_status() twice. > > > >No! Not another iterator. There are two and this makes the function > >quite hard to follow already. We do not want to add a third one. > > > > Two iterators here are? I don't get your point. i is the main iterator to process the whole imput. start is another one to control the batch to migrate. We do not need/want more. More clear? -- Michal Hocko SUSE Labs