Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2819031ybi; Thu, 18 Jul 2019 15:09:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwC2fbZxOTcTXihYjXbQjTxGRX918OCYm+pQ3wMgwuk5+9CoTnFPGz5AL/a6HAckVEuLBIE X-Received: by 2002:a63:c203:: with SMTP id b3mr50867204pgd.450.1563487767343; Thu, 18 Jul 2019 15:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563487767; cv=none; d=google.com; s=arc-20160816; b=pF3A/dyYqIl4oDgg3wdVfXnxb+ocOK26PIHh3CRTR5atQGlwvK+o/QZd+4pkoQKvBJ 193H6B6hfMZdATPzAi29s0bi9wswipBnn1YNW7+2H4/zEdkerY3JOT3KNwbBDDhkP+EZ /3fMy4sxj3ho6B0sgf+Ay1jXXrw/kfYpTt+zOFZAd5aONwleQYWvPpZzn9hL5YRVzM6S OPCAEXHsLPW/KTIPpFq+Iklbzx6KuSVWhdZvG6Ceuoxgi1uda0L2H4ua6JbnINGXwZao yu7nk/kqOrOyGxPP/ZKpqt9g3t5ed53PPEajtQoRxhcXU3ouxrXP2cB+qGQbuyWuRgjq 9g3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=+Jwz3mP3TVVRwA+8/Iil5EIlfG8Tly5xGOIwN4hmUt4=; b=fyT08VN6LY7QD+hQriCW36Bo77KsdUz1vpVwkDy6OofaUEu9cFWPbb7Wvja4eQLbw1 6Pnqmy6dieW1bj17abijsuDQri9rvkj73oPsSabyiJpe9FEARxeJRDr+i3HBIfL+P73h 6DSK8rESnF4na566H0GvLBw8jema/20WZZg58YRsUcZEssZWHeSqFese4m5oQW42+bNU vFomanVjyuXNEhfjSqNYlX2GDCgIkzqz03WqPqZ31C2CzZ4QQrycQPbJcRmAAISFRU6T PeX/yuUsaR2gezzol8UGecA4inDp/yc2Z5UqkYK9rkdThnNG8fyVmbMwCaWOfYDDjC7W ewOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=W1DjZwMa; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i24si2790571pgh.224.2019.07.18.15.09.11; Thu, 18 Jul 2019 15:09:27 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=W1DjZwMa; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728140AbfGRWHK (ORCPT + 99 others); Thu, 18 Jul 2019 18:07:10 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36963 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727780AbfGRWHJ (ORCPT ); Thu, 18 Jul 2019 18:07:09 -0400 Received: by mail-pg1-f196.google.com with SMTP id i70so2752938pgd.4 for ; Thu, 18 Jul 2019 15:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=+Jwz3mP3TVVRwA+8/Iil5EIlfG8Tly5xGOIwN4hmUt4=; b=W1DjZwMaV2AVqZiBstV2H1vjkSj6VtgV6Kmx6bJAsEAr0wQHBkcWN+Pg/hUDmKbt5p nMos2P60R5Bbjn1yfEN+bY1coSARNSMrKZIIbo2KPmBUYzn5z5Y6rxqg7g5GjzAvXPvP rSfnukwB+GZNj2/rusjBqenkizmReRbaS3qzOPb923VVWv4TzTTQa2PBKODzaLZDZyx4 Rn27bQY42PbyATHJCjQRXx3zSdCCC8vzd5I92Bbyy1xQ+t1bFl+M06WUpscxo7Mc8ZZW ZETwIioafzk5vCUX/pmAaionzCoSgvIF8fSKZW6d9P/BxtDHAdsSZXYvA4GkN1yP3iao 7J5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=+Jwz3mP3TVVRwA+8/Iil5EIlfG8Tly5xGOIwN4hmUt4=; b=qLlfFMNzNipZJWCCOsGyUHu6P4uHF6DDP4Nj7VlgbR5z+ZnkekpdAqeyMNl4z/QJlE uxPyFmRqZjE/MkndZeNVCQ6Q4bd8WFVubxv1t+8oIa3mLItydh+Xn7AJvrYdr6JUAPn9 9tvP7DkAY1oI08EJb9Drsyljw9ggL5dW2NePNnNBSsBj2K3/Lf91OYTr5lTQmDo1P+5J echgclOlJ4neO6qpCRgoNfHHv7ihWF+onUfUcERr10vbXQCuLff5pFnPfA6FgsmvxJpU kqZFY/Es8OZl3VomBMj1UldcDqDHmicLKgl4f3WD3cuKTVEhRl1JxIDCB0So7AbwCutf +82w== X-Gm-Message-State: APjAAAWYWbr1zl2PtaLGBbQJa8Bmpa3zeYmsEp9OABYkm5NGI0fiKeur iMbcutVNTk9wgOI9rbzdEQWwiQ== X-Received: by 2002:a63:506:: with SMTP id 6mr49373861pgf.434.1563487628287; Thu, 18 Jul 2019 15:07:08 -0700 (PDT) Received: from [100.112.64.100] ([104.133.8.100]) by smtp.gmail.com with ESMTPSA id r2sm39349424pfl.67.2019.07.18.15.07.07 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Jul 2019 15:07:07 -0700 (PDT) Date: Thu, 18 Jul 2019 15:06:50 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Vlastimil Babka cc: Andrew Morton , Yang Shi , hughd@google.com, kirill.shutemov@linux.intel.com, mhocko@suse.com, rientjes@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [v3 PATCH 2/2] mm: thp: fix false negative of shmem vma's THP eligibility In-Reply-To: Message-ID: References: <1560401041-32207-1-git-send-email-yang.shi@linux.alibaba.com> <1560401041-32207-3-git-send-email-yang.shi@linux.alibaba.com> <4a07a6b8-8ff2-419c-eac8-3e7dc17670df@suse.cz> <5dde4380-68b4-66ee-2c3c-9b9da0c243ca@linux.alibaba.com> <20190718144459.7a20ac42ee16e093bdfcfab4@linux-foundation.org> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Jul 2019, Vlastimil Babka wrote: > On 7/18/19 11:44 PM, Andrew Morton wrote: > > On Wed, 19 Jun 2019 09:28:42 -0700 Yang Shi wrote: > > > >>> Sorry for replying rather late, and not in the v2 thread, but unlike > >>> Hugh I'm not convinced that we should include vma size/alignment in the > >>> test for reporting THPeligible, which was supposed to reflect > >>> administrative settings and madvise hints. I guess it's mostly a matter > >>> of personal feeling. But one objective distinction is that the admin > >>> settings and madvise do have an exact binary result for the whole VMA, > >>> while this check is more fuzzy - only part of the VMA's span might be > >>> properly sized+aligned, and THPeligible will be 1 for the whole VMA. > >> > >> I think THPeligible is used to tell us if the vma is suitable for > >> allocating THP. Both anonymous and shmem THP checks vma size/alignment > >> to decide to or not to allocate THP. > >> > >> And, if vma size/alignment is not checked, THPeligible may show "true" > >> for even 4K mapping. This doesn't make too much sense either. > > > > This discussion seems rather inconclusive. I'll merge up the patchset > > anyway. Vlastimil, if you think some changes are needed here then > > please let's get them sorted out over the next few weeks? > > Well, Hugh did ack it, albeit without commenting on this part. I don't > feel strongly enough about this for a nack. Right, I had no further comment: Yang and I agreed one way round, you thought the other way. I was more persuaded by Yang's 4kB example than by what you wrote; but not hugely excited either way. Hugh