Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2223227ybg; Thu, 24 Oct 2019 06:43:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxb19reXQQOJw67F9wLOpKqtJ8l6cJ+5dn+DXGdZKHGmq8RIQVcnhteJ3jjEP3Z9Mbm37dp X-Received: by 2002:aa7:db49:: with SMTP id n9mr26033489edt.105.1571924635612; Thu, 24 Oct 2019 06:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571924635; cv=none; d=google.com; s=arc-20160816; b=q0CBa4O6pMqYXhxworNASjofzaA40U/DVsNFL9FjMJK9JskZ3g6XqTY3t82Dxw8NNr niWiwVIOQ/eC1srKkGU7mGqTk/c+S3UdOKAlv1MR3KDeJKPgRFH3x50emZTLEePmJkxq wivl7wMC6T6J9zsAymfDy3sfw9dKTf6rzUBjkyTlJHcucdSyEQjQgp21wpOatWZXXeK7 oD1I/56X9Nk/9HH/qFyWMR24j7+mnOC8uF7MQ2of9aYHAVZBZscadNxwBc9BYAdvON2Z IMMSrttIYDSx2IiD0vfmd6JB8Oje614JMNisHdYVtVtCDikzOCRzm6QTYZuz5kEINPTg 4PHw== 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=0A/h7iLy4iHQtSsekrwsy2+ZOdTrZGwWLZDqgK94iTI=; b=AI4zQ0VrHzztgN30Bm0WemaWrnS1uU8QnTXFi7GwtTUib3oBtKU/rLFZV6/0KE+2Vs wzFRwTFNFIgOxFwv0OVLZ2lnsVgDUsrRADxTxTzELT3Vbj9LONHQTknihewVwWmRO3dt lmB1GUM6Vm+VkUEBQNnMXoEfKokbbJFjh4vVlNcCGr+I2NDpzU5/XAO+fGIJbfM/jnG7 0f6aTOYMZmbBVc8ad5N3uRyYbYa7sXn3DRj4nrZG8goagOeioUdSux5Jii2vCGstBBI4 XHFMZp8je8rC2BUDZ5ONoc0gktq5XvQQwm7hyy7NUXm7nyH2tyXCyJZxDC0L56Z/uPZq 6oWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WiW6N27n; 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 dt26si6129963ejb.38.2019.10.24.06.43.19; Thu, 24 Oct 2019 06:43:55 -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=WiW6N27n; 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 S2404818AbfJWS5u (ORCPT + 99 others); Wed, 23 Oct 2019 14:57:50 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42897 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404756AbfJWS5t (ORCPT ); Wed, 23 Oct 2019 14:57:49 -0400 Received: by mail-pg1-f195.google.com with SMTP id f14so12654596pgi.9 for ; Wed, 23 Oct 2019 11:57:49 -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=0A/h7iLy4iHQtSsekrwsy2+ZOdTrZGwWLZDqgK94iTI=; b=WiW6N27nIGzcNodI0rwBgBHNHkWhgXetcPMk3sdC5v3k+2c7+jvFI5wUsKX4vYKVPH b57QDME3T4453VBQh06dbHYs6/6qkpCpi0D7ju8F43it9oOGgqfNMtOdrAL5brWnRLSS rwgowlv51ncyLoxqhU3EOUYYJkA5tDHaqYs2XN40yA8QKDGDGLYTyLNtHeto5ImmKaE8 QWU8n15oNlqodMsKE8FfF0uxDy7Zowk8Pxn8i6HJ5dOgEtI6yyFxxjLuFOeV25s/Chw3 re2XRlgnj4fuCwCWA4goBXL0qgQhWTezgUeEhuALaZtaGGUmvvAn/HRef6Irqh0Ony+u dT5g== 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=0A/h7iLy4iHQtSsekrwsy2+ZOdTrZGwWLZDqgK94iTI=; b=D58MJ1e/JtjzYy5hgkWoZEF2nwr55KXAaAcuSwnGI6bKGaUgbl2mbcwmgAxc7v+fkT qbxAbwM0B77wT4DzF67AOlDWziqjEAlQfr9iY6VeviKoX3duzMhQz/4Qq5qcqJb1K7hH NGkH0WHxMcoudxIuD68CdKvfBH1P6jm1AiEEOmFA/6JQYKQ0oEWNR5TNt7unELnWE/Kl 0OufQrqA08qVnIMYlL02Hj88QuesdRx0P/tod6zHArF1gPjiRDxUeu1vj9hJZrLfUfqV b4XngSQalL5H47PHORLBSEcwBk+RqxHgDtpF0b3BcbWQp3LSSwNJODT2b5yU0WdR3Dqf 7krQ== X-Gm-Message-State: APjAAAWZy3POPZ6fUHnvQi8+4onnwPBOzPVik3cmNU9K0jxtM9FtmOXY jCjENQmkwP1HIo9nWeiycHlVgw== X-Received: by 2002:a63:fe15:: with SMTP id p21mr11544514pgh.26.1571857068258; Wed, 23 Oct 2019 11:57:48 -0700 (PDT) Received: from [100.112.92.218] ([104.133.9.106]) by smtp.gmail.com with ESMTPSA id w11sm30045956pfd.116.2019.10.23.11.57.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Oct 2019 11:57:47 -0700 (PDT) Date: Wed, 23 Oct 2019 11:57:17 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Yang Shi cc: Matthew Wilcox , hughd@google.com, aarcange@redhat.com, kirill.shutemov@linux.intel.com, gavin.dg@linux.alibaba.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [v2 PATCH] mm: thp: handle page cache THP correctly in PageTransCompoundMap In-Reply-To: <792ea136-4fa0-c87b-9399-5ca47c501c9c@linux.alibaba.com> Message-ID: References: <1571850304-82802-1-git-send-email-yang.shi@linux.alibaba.com> <20191023172420.GB2963@bombadil.infradead.org> <792ea136-4fa0-c87b-9399-5ca47c501c9c@linux.alibaba.com> 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 Wed, 23 Oct 2019, Yang Shi wrote: > On 10/23/19 10:24 AM, Matthew Wilcox wrote: > > On Thu, Oct 24, 2019 at 01:05:04AM +0800, Yang Shi wrote: > > > + return map_count >= 0 && > > > + map_count == atomic_read(&head[1].compound_mapcount); > > > } > > I didn't like Hugh's duplicate definition either. May I suggest: > > Thanks, Willy. It is fine to me. Will take it in v3. Agreed, that will be better. Hugh