Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4939446imm; Tue, 9 Oct 2018 07:25:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV6268Ae8VahjAhqpXJ7uBWXHiiQoVPEtRPYqM4gL78Up1NLB+H2YN+Tjx3SSQV0dwoOfzTdP X-Received: by 2002:aa7:8281:: with SMTP id s1-v6mr29874841pfm.63.1539095159054; Tue, 09 Oct 2018 07:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539095159; cv=none; d=google.com; s=arc-20160816; b=BuvmV+HSJYZ5K2jq0lyrsWSodo2t1/4EO1G+YFz4NkChnIFV7z6hPtIylXGr7EY3N6 k38pGtAHhEAm3FPIi8FnOh7X3m16swa5Za7RDsEY2CsLzY5dAK3DE9Kucg6uChbvsvzj +NJuz/12Ahlq6kVe/pLbKa9FIGhZ5h790NkGg7oDVOyf4QLLvfYZvgYC4QZGpyOef53m eOshyITrzP9c2nVmxjG3oca80tlsdhOFyCjSTI8C2tqakmituZUQzuR2egsX3d6FQOIF KPFf0xfSTGnOy7pw8bP5cQycoQQ/pX6WzCwwHRRZl4Tdp9rrzFQ89Ppf61LblVf3WXRP 6PTQ== 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=Q8VNs5NzSfbdnasKLc6BMQoTBkkB6QfqW3N8eiPqorQ=; b=BPxwg/JxraZKoIk5VDDOGZ2qGBU4UkoHAeSBXO65UVbXTIYBm5mppCmT/SNhk93Tn9 fi63Gq1X3syNEFuDlIMyzVk2AoNMvfRS3R7s0FJAXqnBNQgr1m2e0IcQsloHEndXIqIy CeuPGOvd4gs3DcTHSzA1NrFUby1x7o6qJRilxbLTXiuzZICB+s9Ow+hruTVFcwRQrrBO 5T+7laoUn6azCcMw0zgn+AwpV90UqXSY3lIGExxDM1JEaNlE4LSXO9PQdFsDjd+xSSdJ 6k7NUb8uol8l+YwNloS2blSNMKV2RqySLPVpNO7Croq1MEIM78KfTfjbjshbTCy8OeTS 0hiA== 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 p9-v6si24429586pli.395.2018.10.09.07.25.43; Tue, 09 Oct 2018 07:25:59 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726525AbeJIVmY (ORCPT + 99 others); Tue, 9 Oct 2018 17:42:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:60300 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726393AbeJIVmY (ORCPT ); Tue, 9 Oct 2018 17:42:24 -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 57E4BAAE8; Tue, 9 Oct 2018 14:25:11 +0000 (UTC) Date: Tue, 9 Oct 2018 16:25:10 +0200 From: Michal Hocko To: Mel Gorman 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: <20181009142510.GU8528@dhcp22.suse.cz> References: <20180925120326.24392-1-mhocko@kernel.org> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181009130034.GD6931@suse.de> 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 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. > Hence, I started leaning towards advise as it is > really about advice that the kernel can ignore if necessary. That said, > I don't feel as strongly about the "how" as I do about the fact that > applications and libraries should not depend on side-effects of the > MADV_HUGEPAGE implementation that relate to locality. completely agreed on this. -- Michal Hocko SUSE Labs