Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp23749imu; Tue, 27 Nov 2018 08:31:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/UjX/AQVA6dSRxaisntCuZiTDiO/ZRZigdJwmFF3CVPi1O4O3qmGLQMVb+atLtTFfNc+YwQ X-Received: by 2002:a63:d818:: with SMTP id b24mr29264092pgh.174.1543336276603; Tue, 27 Nov 2018 08:31:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543336276; cv=none; d=google.com; s=arc-20160816; b=sehRaur9Z/gfTg/dSoqMXAkrbYon696kMiL9jjQxTDW/HYJibC5ub5+9S6FuvSUclv HhlMbIyVxAk0YKZQR6hv4LOb+gLeuAJQfqzQ9Z0Q7uGBkl5JZSwro8JgKc5Rt8N0BhqK v7/OIIMbdr6N3jFiOJf2HwXtKw32dWiT9bsRpxKiRKRprFb4JqSNAoTWxNKJkkvrqqGM NEKpEz9J+ztz589hmcaRe20hXeZhG1xgdnEaTfF9SZrQ+86xPrMdP5ZuXzKTV55cBNQ5 /4MHraFFUg44W9D/F4rZxKKflmJzHxTPHENBqHyNh1sCPRn7nYYTcAfBtOjaG5e+/heA t88A== 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=9gk98VzdKB2yYPazLliCvqyxr4giKQkPrrm+uNLJrXo=; b=oFRIlkvZF6eJOvCvvH3hMR02aZu7yzAj00R/zTvxbVWIzydg5OYl+OKxqYbr87AYmN cUs8TpWe33JNifFyrlXLZIXi0cdUsgBSOpv5U7sjB0nP4Wls0g67jyN+terbVUC2VXFs 3ljg3EAw6zRamjZ/3G9n/GkbTU1DxCCtESclPJIQCHgdYTE525bRONOXU9JyUsceksgj qZRCOzjQw5ebFPsmRRHECoPLQjskm9bNCz+3aRoMZHMzYCZn6nn5E0+ngqnkemtefMuH DSlKiHFNJvn0rCxi+jKCJPO92YLkYda3AIKy/K20Tyqnzz00OO6GPHYoHXURvSMyt0Q7 RaFQ== 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 d17si4472588pfm.40.2018.11.27.08.30.52; Tue, 27 Nov 2018 08:31:16 -0800 (PST) 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 S1730951AbeK1DYM (ORCPT + 99 others); Tue, 27 Nov 2018 22:24:12 -0500 Received: from mx2.suse.de ([195.135.220.15]:58818 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726390AbeK1DYM (ORCPT ); Tue, 27 Nov 2018 22:24:12 -0500 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 354C8AB6D; Tue, 27 Nov 2018 16:25:45 +0000 (UTC) Date: Tue, 27 Nov 2018 17:25:44 +0100 From: Michal Hocko To: William Kucharski Cc: linux-api@vger.kernel.org, Andrew Morton , Alexey Dobriyan , linux-mm@kvack.org, LKML Subject: Re: [RFC PATCH 3/3] mm, proc: report PR_SET_THP_DISABLE in proc Message-ID: <20181127162544.GA6923@dhcp22.suse.cz> References: <20181120103515.25280-1-mhocko@kernel.org> <20181120103515.25280-4-mhocko@kernel.org> <0ACDD94B-75AD-4DD0-B2E3-32C0EDFBAA5E@oracle.com> <20181127131707.GW12455@dhcp22.suse.cz> <04647F77-FE93-4A8E-90C1-4245709B88A5@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <04647F77-FE93-4A8E-90C1-4245709B88A5@oracle.com> 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 27-11-18 07:50:08, William Kucharski wrote: > > > > On Nov 27, 2018, at 6:17 AM, Michal Hocko wrote: > > > > This is only about the process wide flag to disable THP. I do not see > > how this can be alighnement related. I suspect you wanted to ask in the > > smaps patch? > > No, answered below. > > > > >> I'm having to deal with both these issues in the text page THP > >> prototype I've been working on for some time now. > > > > Could you be more specific about the issue and how the alignment comes > > into the game? The only thing I can think of is to not report VMAs > > smaller than the THP as eligible. Is this what you are looking for? > > Basically, if the faulting VA is one that cannot be mapped with a THP > due to alignment or size constraints, it may be "eligible" for THP > mapping but ultimately can't be. > > I was just double checking that this was meant to be more of a check done > before code elsewhere performs additional checks and does the actual THP > mapping, not an all-encompassing go/no go check for THP mapping. I am still not sure I follow you completely here. This just reports per-task eligibility. The system wide eligibility is reported via sysfs and the per vma eligibility is reported via /proc//smaps. -- Michal Hocko SUSE Labs