Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5004330imm; Tue, 9 Oct 2018 08:19:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV60RHUMgigaxrpLV/py8asomhLMiQowOHVt83UEHcFVPAKRgi2DtBdousGu+wy8Se9MjS/qE X-Received: by 2002:a17:902:7887:: with SMTP id q7-v6mr29154911pll.111.1539098395957; Tue, 09 Oct 2018 08:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539098395; cv=none; d=google.com; s=arc-20160816; b=gEof0jjo+yOzdTonZfzvFIPnQ6WDPcycZ39A0+PiOSvspJzv1yCbpn2LHQwoiYFH3H Udx+eLbXuS5OvD9U2GHNo9fMxmfnEP30C1aJ0U8E7nYNNHrhdLA5I1213VFF6Qo/cZxl O9I5UPR8JIx6S4sPsHaLm/BspFX5kyYPMiTzFx/+2ydWCYpWeFjmLSJTJuxfkSIoSTpo ludfEFcg3+mK4b+av22GyFFKd/laL/3RX8WJcf80gH+vjG9UUOGwzHoa7tgHaVfY6max KDAP4tdVwcFBBkMecQYWUTgJwmhAsCENdmBT0hn7s5J8XHaTMnL/DRJnCsynitZrpQVY y00A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NLLlYrGhWwfH6s7SxmhrrLjH6i0QSAucacb/NhyvvOc=; b=B/1tL3ql/BXHcW70zUEFO7PFpYqan/VZVhHx1foH+tcBdX3HVcs9hEd+9gh6zZTSHF tCMn5OWtKxQViSW3GFqKLbNmJusrGBX/ADJpT+zjmsSZxdy3WwY/e0P26Ifdh2Hk0UIn f+77RkBk3YwlrOUERXcEc/XvziL69ibfFBUVtUPc97lfIA6wP6lebHvVEc3Hfc1aEneI UROoCNMQqx7KeDkgCk1zYzvnLR5FVJWwrvkb445Oyz8/Wq0fOPaF9Qwv8zCR4gVzPQ5m rHQuBrIf3r+526fM1TrhW8+xY7My7S76i5mo2Nofq9x05MhwnNlxBAH0JB6l4Ati3rGv CcOA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e21-v6si19839934pgk.311.2018.10.09.08.19.41; Tue, 09 Oct 2018 08:19:55 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbeJIWeH (ORCPT + 99 others); Tue, 9 Oct 2018 18:34:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:43230 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726393AbeJIWeH (ORCPT ); Tue, 9 Oct 2018 18:34:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BC4CAAD68; Tue, 9 Oct 2018 15:16:41 +0000 (UTC) Date: Tue, 9 Oct 2018 16:16:38 +0100 From: Mel Gorman To: Michal Hocko Cc: David Rientjes , Andrea Arcangeli , Andrew Morton , Vlastimil Babka , Andrea Argangeli , Zi Yan , Stefan Priebe - Profihost AG , "Kirill A. Shutemov" , linux-mm@kvack.org, LKML , Stable tree Subject: Re: [PATCH 1/2] mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings Message-ID: <20181009151638.GE6931@suse.de> References: <20180925120326.24392-2-mhocko@kernel.org> <20181005073854.GB6931@suse.de> <20181005232155.GA2298@redhat.com> <20181009094825.GC6931@suse.de> <20181009122745.GN8528@dhcp22.suse.cz> <20181009130034.GD6931@suse.de> <20181009142510.GU8528@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20181009142510.GU8528@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 09, 2018 at 04:25:10PM +0200, Michal Hocko wrote: > On Tue 09-10-18 14:00:34, Mel Gorman wrote: > > On Tue, Oct 09, 2018 at 02:27:45PM +0200, Michal Hocko wrote: > > > [Sorry for being slow in responding but I was mostly offline last few > > > days] > > > > > > On Tue 09-10-18 10:48:25, Mel Gorman wrote: > > > [...] > > > > This goes back to my point that the MADV_HUGEPAGE hint should not make > > > > promises about locality and that introducing MADV_LOCAL for specialised > > > > libraries may be more appropriate with the initial semantic being how it > > > > treats MADV_HUGEPAGE regions. > > > > > > I agree with your other points and not going to repeat them. I am not > > > sure madvise s the best API for the purpose though. We are talking about > > > memory policy here and there is an existing api for that so I would > > > _prefer_ to reuse it for this purpose. > > > > > > > I flip-flopped on that one in my head multiple times on the basis of > > how strict it should be. Memory policies tend to be black or white -- > > bind here, interleave there, etc. It wasn't clear to me what the best > > policy would be to describe "allocate local as best as you can but allow > > fallbacks if necessary". > > I was thinking about MPOL_NODE_PROXIMITY with the following semantic: > - try hard to allocate from a local or very close numa node(s) even when > that requires expensive operations like the memory reclaim/compaction > before falling back to other more distant numa nodes. > Seems reasonable. It's not far from the general semantics I thought MADV_LOCAL would have. -- Mel Gorman SUSE Labs