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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7013FC433DB for ; Tue, 12 Jan 2021 14:53:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D013B23130 for ; Tue, 12 Jan 2021 14:53:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D013B23130 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1B8FF8D00AC; Tue, 12 Jan 2021 09:53:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 18FA58D00AA; Tue, 12 Jan 2021 09:53:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 07F428D00AC; Tue, 12 Jan 2021 09:53:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0241.hostedemail.com [216.40.44.241]) by kanga.kvack.org (Postfix) with ESMTP id E48308D00AA for ; Tue, 12 Jan 2021 09:53:29 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 888B01EE6 for ; Tue, 12 Jan 2021 14:53:29 +0000 (UTC) X-FDA: 77697416538.10.kiss71_580801427516 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 62E4F16A0D1 for ; Tue, 12 Jan 2021 14:53:29 +0000 (UTC) X-HE-Tag: kiss71_580801427516 X-Filterd-Recvd-Size: 3485 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 14:53:28 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1610463206; 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=6uCA0bR0UPyfjRf0IGWsHK+lZA/GA9OSf48psytri08=; b=t7FHH0CVf//EC3qCB50EVuwV2I9siSGuX/p/JkGWdsSXgJb+YNDZOdN6cipYj0iORT1ztO ZS8ykZHKyMukMUquaxLkdZQrEfYYlnHjU+TEB70wL6X53z+Vnly7bmF6kPR/PX6cnB4g+t bChXigk/QOBrAIynhNLufOoKleu5ea4= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 698A6AC24; Tue, 12 Jan 2021 14:53:26 +0000 (UTC) Date: Tue, 12 Jan 2021 15:53:25 +0100 From: Michal Hocko To: David Hildenbrand Cc: Muchun Song , mike.kravetz@oracle.com, akpm@linux-foundation.org, n-horiguchi@ah.jp.nec.com, ak@linux.intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yang Shi Subject: Re: [PATCH v3 1/6] mm: migrate: do not migrate HugeTLB page whose refcount is one Message-ID: <20210112145325.GS22493@dhcp22.suse.cz> References: <20210110124017.86750-1-songmuchun@bytedance.com> <20210110124017.86750-2-songmuchun@bytedance.com> <1b39d654-0b8c-de3a-55d1-6ab8c2b2e0ba@redhat.com> <20210112112709.GO22493@dhcp22.suse.cz> <20210112121643.GP22493@dhcp22.suse.cz> <20210112142337.GR22493@dhcp22.suse.cz> <52ec4899-80df-4cbe-41f1-e0a29e838afa@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52ec4899-80df-4cbe-41f1-e0a29e838afa@redhat.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue 12-01-21 15:41:02, David Hildenbrand wrote: > On 12.01.21 15:23, Michal Hocko wrote: > > On Tue 12-01-21 13:16:45, Michal Hocko wrote: > > [...] > >> Well, currently pool pages are not migrateable but you are right that > >> this is likely something that we will need to look into in the future > >> and this optimization would stand in the way. > > > > After some more thinking I believe I was wrong in my last statement. > > This optimization shouldn't have any effect on pages on the pool as > > those stay at reference count 0 and they cannot be isolated either > > (clear_page_huge_active before it is enqueued). > > > > That being said, the migration code would still have to learn about > > about this pages but that is out of scope of this discussion. > > > > Sorry about the confusion from my side. > > > > At this point I am fairly confused what's working at what's not :D heh, tell me something about that. Hugetlb is a maze full of land mines. > I think this will require more thought, on how to teach > alloc_contig_range() (and eventually in some cases offline_pages()?) to > do the right thing. Well, offlining sort of works because it retries both migrates and dissolves. It can fail with the later due to reservations but that can be expected. We can still try harder to rellocate/rebalance per numa pools to keep the reservation but I strongly suspect nobody has noticed this to be a problem so there we are. -- Michal Hocko SUSE Labs