Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4829425imm; Tue, 9 Oct 2018 06:01:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV60rFCcJDIjEwbNwvsBh3ShfcxtXvJ0PlXgiqQH7ayIlI4kczRWN4NW9kIO5ybCnkyrYECSf X-Received: by 2002:a17:902:4583:: with SMTP id n3-v6mr28997881pld.255.1539090079991; Tue, 09 Oct 2018 06:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539090079; cv=none; d=google.com; s=arc-20160816; b=JwX15fiiID5ZgZ2fS/OwM2qR/jjBK2Zo7jeNzOJeV9yMwjqB3712FDBzo3+2mwZHzh jfFnskr06s+v3s5Kst/OnhuVrgB4EVX/B/RjfX6xDgnjaJ6I4IzJNBN5U2/EiRL/ZSD2 e4lPzWoTGLV9irWKKtrIb3KLy2U8PY693bp/HGRLC6Cu8r3hd4ivR6TYBHVxmhppNsAs M8392aK6+xQLIvWPQXjnok+krWz+WJZ1V9VvWQ6RkDAMWZ55rKihI9cikQ4ekjCw6dHo TnIs/2PKvIjbSsCjEGcjrqtgzSvtdd64YT5GCI7gXNVAeEnAR1bcCPCbYDAMrI6uKeAI rqFA== 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=33W1Yp/FqyC3ClUrQDHKiSVY2HKKzkwTwSdmB7DjpeI=; b=JTBUdSE8IqjdGLMiEcF6QRueic8GeBOhFzMdiwg/GaJyq+CPVAAHIGpL4TKkL2PROr 2Z4AbZwGyG9B2ccdliIh8QJdq/0CJuezpJp6p9ONuBq8hO7c2zawvHdk7JJsxCzizXcb 5Q/snXyp0MtyMIlA85yYiD/r0W5YaUGG80GJEDRbNFq7qYXR5SjDa+tZS0ovqd2pMHYq vt27VgIvZCefr2RbjNtJ/DP1CsGhvWYREI5aazYxmokMT8z+zrbbfoX0rPYEyIBK/2Ku EcJHzeg+uXGcHfWP/zV/vw7vPVP+4BN7ZxmLbloDsMZ7PKih17IZ7CKWCMjiG/7vf7+0 5KYQ== 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 t20-v6si22255201plj.261.2018.10.09.06.01.04; Tue, 09 Oct 2018 06:01:19 -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 S1726693AbeJIURa (ORCPT + 99 others); Tue, 9 Oct 2018 16:17:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:40054 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726445AbeJIURa (ORCPT ); Tue, 9 Oct 2018 16:17:30 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E9FC1AFC2; Tue, 9 Oct 2018 13:00:38 +0000 (UTC) Date: Tue, 9 Oct 2018 14:00:34 +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: <20181009130034.GD6931@suse.de> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20181009122745.GN8528@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 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". 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. -- Mel Gorman SUSE Labs