Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755817AbdLOJ3H (ORCPT ); Fri, 15 Dec 2017 04:29:07 -0500 Received: from mx2.suse.de ([195.135.220.15]:34728 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755597AbdLOJ3C (ORCPT ); Fri, 15 Dec 2017 04:29:02 -0500 Date: Fri, 15 Dec 2017 10:28:59 +0100 From: Michal Hocko To: "Kirill A. Shutemov" Cc: linux-mm@kvack.org, Zi Yan , Naoya Horiguchi , Vlastimil Babka , Andrew Morton , Andrea Reale , LKML Subject: Re: [RFC PATCH 1/3] mm, numa: rework do_pages_move Message-ID: <20171215092859.GT16951@dhcp22.suse.cz> References: <20171207143401.GK20234@dhcp22.suse.cz> <20171208161559.27313-1-mhocko@kernel.org> <20171208161559.27313-2-mhocko@kernel.org> <20171213143948.GM25185@dhcp22.suse.cz> <20171214153558.trgov6dbclav6ui7@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171214153558.trgov6dbclav6ui7@node.shutemov.name> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1055 Lines: 39 On Thu 14-12-17 18:35:58, Kirill A. Shutemov wrote: > On Wed, Dec 13, 2017 at 03:39:48PM +0100, Michal Hocko wrote: [...] > > + err = 0; > > + if (page_to_nid(page) == node) > > + goto out_putpage; > > + > > + err = -EACCES; > > + if (page_mapcount(page) > 1 && > > + !migrate_all) > > Non-sensible line break. fixed > > + goto out_putpage; > > + > > + if (PageHuge(page)) { > > + if (PageHead(page)) { > > + isolate_huge_page(page, pagelist); > > + err = 0; > > + } > > + } else { > > Hm. I think if the page is PageTail() we have to split the huge page. > If an user asks to migrate part of THP, we shouldn't migrate the whole page, > otherwise it's not transparent anymore. Well, as I've said in the cover letter. There are more things which are worth considering but I've tried to keep the original semantic so further changes should be done in separete patches. I will work on those but I would prefer this to stay smaller if you do not mind. > Otherwise, the patch looks good to me. Thanks for the review -- Michal Hocko SUSE Labs