Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp407709oof; Mon, 24 Sep 2018 22:50:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV62veq1B1icNvg+stbD7ehGLh/JtrlkK0uekI8Ieipe1ZwSRwm5g6OFih8/64onL1EtLWtsz X-Received: by 2002:a63:f344:: with SMTP id t4-v6mr1784542pgj.428.1537854654610; Mon, 24 Sep 2018 22:50:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537854654; cv=none; d=google.com; s=arc-20160816; b=oWJFlqSbSkPYTiskU2SuLNaBpmqwTw3yGnoEWpPlIPtQ0voquDZDadwLocfg8c9YOf /DMN44RANaCVk3SZ2PFIL8WkqyNJmDuoMwZRfcV3MYvRtbqQMrNzPKfAAe+hTDbQV05a 4SqRpiXR6qKZQXgv9ydQxFhxSNou1hCLYxXdHuze2zVa8w+Q/81dQfj7WXsKfRtNEmOa yJjmBJW0Dp7z/W7PIGcJ2TCCF+tmVbGU+gJa8Ny7llGaTEpI0Dw6EFktKpuwDLOimIIo XvXcnEOtWflDmqD5oXlbHj9mRCBEsFVtldYDREMShPeRKkNdC0MeM1QF4HYG0M7xEkFB r4iw== 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=/t4lDGO6eT+va2MX584vi2iqy/1vFAylageh6qy9i4M=; b=H2j/lO5TkgQp+FCmAxH+VcyOu7NF5RYxSzUJndkdjX/XltV+QaRK+f0V2g98ksyNYU QCvF3H6iNV75BQfbfaHwoYyTr4b6eh3/3NAp+/k7T6CFhYNfwDWHaUknjWHDsmNl6DQk 8N/OmVNY3jHiTEW6facAeM27PGSBi7JlB2Qt50Dhh3kOgnm2g08jL75pQ0PwZTEZzQgQ bUzzf4SrkApchgvVfq4ZOfvSVHlTNsF2rBBcxxTZczbXdiTyMl6l4fqOrHxc46CBHfwi zjyP7sBYE+RVGYX+PFUd6cL1Ll6/cV2/4GLCw1ofDeiQkwXso5h+cdJJHRI3m1t/2XPK DIFg== 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 75-v6si1399506pfr.242.2018.09.24.22.50.38; Mon, 24 Sep 2018 22:50:54 -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 S1726208AbeIYL4Q (ORCPT + 99 others); Tue, 25 Sep 2018 07:56:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:57420 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725978AbeIYL4Q (ORCPT ); Tue, 25 Sep 2018 07:56:16 -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 35198B0AB; Tue, 25 Sep 2018 05:50:23 +0000 (UTC) Date: Tue, 25 Sep 2018 07:50:22 +0200 From: Michal Hocko To: Vlastimil Babka Cc: David Rientjes , Andrew Morton , Alexey Dobriyan , "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org Subject: Re: [patch v2] mm, thp: always specify ineligible vmas as nh in smaps Message-ID: <20180925055022.GL18685@dhcp22.suse.cz> References: <20180924195603.GJ18685@dhcp22.suse.cz> <20180924200258.GK18685@dhcp22.suse.cz> <0aa3eb55-82c0-eba3-b12c-2ba22e052a8e@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0aa3eb55-82c0-eba3-b12c-2ba22e052a8e@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 Mon 24-09-18 22:43:49, Vlastimil Babka wrote: > On 9/24/18 10:02 PM, Michal Hocko wrote: > > On Mon 24-09-18 21:56:03, Michal Hocko wrote: [...] > >> That being said, I do not object to the patch, I am just trying to > >> understand what is the intended usage for the flag that does try to say > >> more than the madvise status. > > > > And moreover, how is the PR_SET_THP_DISABLE any different from the > > global THP disabled case. Do we want to set all vmas to nh as well? > > Probably not. It's easy to check the global status, but is it possible > to query for the prctl flags of a process? Dunno but I suspect there is no way to check for this. > We are looking at process or > even vma-specific flags here. If the prctl was historically implemented > via VM_NOHUGEPAGE and thus reported as such in smaps, it makes sense to > do so even with the MMF_ flag IMHO? Yes if this breaks some userspace which relied on the previous behavior. But if nothing really broke then I guess it would be better to have the semantic as clear as possible. Go and check the global status to make the whole picture doesn't look very sound to me. On the other hand this VMA has a madvise flag on it sounds quite clear and you know what to expect at least. Sure the hint might be ignored in the end but well, these are hints they do not guarantee anything after all. -- Michal Hocko SUSE Labs