Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2800831ybi; Thu, 18 Jul 2019 14:45:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYduBrqOJO6xMGGOBwiCNK/25cbQpq5gNYHXf9vOMJA/rOjf/eKobQh0iCaTEQqdtnNLXv X-Received: by 2002:a63:381d:: with SMTP id f29mr51036436pga.101.1563486357992; Thu, 18 Jul 2019 14:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563486357; cv=none; d=google.com; s=arc-20160816; b=fASmdPSWrGmiflihr8cwWvwXhMbSV97ItlccR/IO3l9cCbjsYOPa/hTvM/yTOSY6YA +vr1nlY3nnjwvX8s0c9EA7vBJ01X9Ml6wW2P7S0PRlJWHVJLDtheXLXgSFu/qRdjRZfA gcis/01tCJBffDkTQjcNo2TjqEsFaw+XNbToAtAVP9CoZDEbZ5IHmXUyNholXaKjsxQK RfSjotOEzxag5+873CJna/c4wYgdYSAAihTt0vWgwKltzosy17WIy2u+2JQEh2i/R4Hu jXsmMpmmQUaZ0hn2QpSD/GHN8aIf4rkT741kdrVebdBIMPmBIPaki6rnAM/PgymUVnCr hbpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=iAfMN0iN70l6JhGqYzxdhxWiaLpg1j0+D8clrhvzkok=; b=Vb0rGRVgwO+6HIKu//EzT3A+Z/hQAS8jHNr8ETvyfmPtt5bU1KvSBaDHMOkO5k0WoB Y4D/YTkPa2cjjtC3VIP+UfhXbYwgCYpQAwk8/zgAKBR1bq+ChJ3ZzxvJgbqYXrJUIvma wVjg0SPleAnQ1xs5r6ILe8BeWBGYV1Ii2mIqMwUiDrx37OoIHfqOC1mBhu4YoawmALPn /hMN9P0c2Kre5f8b/wiX8BU7f8oRxAsNXutfQy0y+sRyX1tkDVmIxKMOicTy3G489HRy bQqhMRqg66ubeyeSdlpt2DvHqiPHsjK8Keas1gFkZknACGWySxxt0pN6C6YeW7qwlRfU HkaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=huhpkdvr; 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 p17si2975115plq.138.2019.07.18.14.45.42; Thu, 18 Jul 2019 14:45:57 -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=@kernel.org header.s=default header.b=huhpkdvr; 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 S2391393AbfGRVpB (ORCPT + 99 others); Thu, 18 Jul 2019 17:45:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:53234 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727780AbfGRVpB (ORCPT ); Thu, 18 Jul 2019 17:45:01 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3875C208C0; Thu, 18 Jul 2019 21:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563486300; bh=AvFJMXMixH9pwAZAEJiAZGH5BdBKz6e6rNwXKbc10vQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=huhpkdvr2Y7vQhrHeuDIvSjajTwPYanZe0q2sPxAQRnBrgSKZ6zEd5/vzFjiv3Px6 occ2gbieMwwsnJWBjF/ZVOLPIcJNzWVFaCFwlcdSojX4q9Oj8RbROxWnRHELdAAXDx WiLHeAEsTgwwQxf8M7bbAA+8Gd2IDWrbC1qldSNg= Date: Thu, 18 Jul 2019 14:44:59 -0700 From: Andrew Morton To: Yang Shi Cc: Vlastimil Babka , 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 Message-Id: <20190718144459.7a20ac42ee16e093bdfcfab4@linux-foundation.org> In-Reply-To: <5dde4380-68b4-66ee-2c3c-9b9da0c243ca@linux.alibaba.com> 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> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?