Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp7250229ybf; Fri, 6 Mar 2020 13:28:29 -0800 (PST) X-Google-Smtp-Source: ADFU+vtLp9vG1RFwBOhd/ODDN+E8tT0yzG4vENb5eVmLaO4xFVPigjMidk4JdDJ7IJbTwKjZgoSD X-Received: by 2002:a9d:6951:: with SMTP id p17mr3993272oto.24.1583530109241; Fri, 06 Mar 2020 13:28:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583530109; cv=none; d=google.com; s=arc-20160816; b=vZd0j85lzRltVOeuHDcCiopGUJcRaVwZgk5/XvuEWG8aWsvAIJQzv0Fcum9r20M0p6 dG5QkAnRC/XUoUnaqYzbpS7q8RfhZPI4LDXAuHsnccl0ZGM6NgdaSVVVYR6nMU8TwQnd bFwpAs0Lpl6e5yyT1rEb8Z9UdbXEZkZkeBkf92WZ5U+VxnYkmuVgfkKF73TS71I/+fYs Q5mN2Lenukk0az7GdHbG/g8pj4UVtcwtllEbBw1k+m3mfgiqMde2ZkFKNv2H+zLHAO04 wSVn6fhNID/imQac94dhnmZhpKqzSaWlXLk9L6mkeN2Lxtu8FrthQEAwarS1yRaiVWKb P8Yg== 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=C0VzUXVAs0KwQk2ex+LNFdy9kNQT2H0n7ipR3g6Roag=; b=pQnGz/RpvO/RY37VOSAxqsBJrYM6lJbL/7ZP6TH3MDVrGr79gLbJ31+8Fsd8CLv7Pm M7d/lsEtCsSxZHNU9KDcBYL6k9bKAel+H6ou8/+4ZDy1alZZx5dHyS9T9eZvziADeLIv c1DfQ0MXYyAKp4GJZW9E3tumwQXRGi9J2LLZOGyQSizWr4Hzkd595U3KkH4cGLW1kjMl 4p2A6PYH8j5YiJtXOFiRnHcgcUkGj6T0yl88cWJq9U0kcrr5cEKDCgIcVu7RN8aFUBqJ hEYt30cw8DUY6oZ2DNANq+JRSxzI73+gyDGjTZlh9Ykcho189NSW9Mnpaz7YFVpY0jTn 8upQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BUhj7FUo; 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 k128si335436oih.135.2020.03.06.13.28.16; Fri, 06 Mar 2020 13:28:29 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=BUhj7FUo; 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 S1726237AbgCFV1y (ORCPT + 99 others); Fri, 6 Mar 2020 16:27:54 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:36474 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726090AbgCFV1y (ORCPT ); Fri, 6 Mar 2020 16:27:54 -0500 Received: by mail-pj1-f65.google.com with SMTP id l41so1630765pjb.1 for ; Fri, 06 Mar 2020 13:27:53 -0800 (PST) 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=C0VzUXVAs0KwQk2ex+LNFdy9kNQT2H0n7ipR3g6Roag=; b=BUhj7FUou0TJsOwEx6ONrXB1sekmtZSqO819dYogLqGfctQMqCmMPfrSjPHxFJYlGF oh+KLjeD+JQicByp6I4YjvohSnBLI467WClN0CdeJJGtjuRyMlTzzPBsjIfdwj9lUQh4 hGitKzXxMqv5/s7XHsPifAQJF0G+5iOt0tOw4k9bb6zsQRdYMYb0KNNMuxwbSlqDWhK3 BmZOG1xEEtSljmfun/Empcz3j8ajeXExAliYTJIXFo3n+rfVjnV+1rjL/voBYJtic3kW dt9LlNHd56fUvMOmmZ39p9BDiszfpR7OfczW3u0ydKORQ0i2TJspmOv2PwSfR/E6bREy TXSg== 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=C0VzUXVAs0KwQk2ex+LNFdy9kNQT2H0n7ipR3g6Roag=; b=oZajZthdWFUQH/pHKbp0mh1hr9MxZqqvQOlm7W5oTgoHUQMtWTSFHeYl0w2xficUwi bPp8aReB8+Q/5brKNVES6Zn6qciDrAU6YUSywvI9AyHbgI8OQ4JB7NWRy2H4vMBAGEwC ctn31XFw2/Jujua4qLJYn4UwUndgRSIN745EJIcksS/S1ICikKRtzaymwyNHyt3CFS8A vlTLFLkJ514CSaBFwJxxxAFPO12sGZVHTl/bKnf7cM7OqtZ+qNYTTsrPsKWi8RhSgNLM cZbUC/2NAWNLebwcg1gbO2pVI5RrzutKRBwGcgsKfkMRgv0ds3RdrTYXJVFlmF/uigmk UbVw== X-Gm-Message-State: ANhLgQ3VjbqZ/jeRQbBzS7g5Ze1K4zvacR7vDZhcedIBJkrtLgTtDnhI nA1CpzrZOEj2H6yfPGsPChmG634j39g= X-Received: by 2002:a17:90a:3ee5:: with SMTP id k92mr3974491pjc.81.1583530072599; Fri, 06 Mar 2020 13:27:52 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id x3sm10279826pjq.5.2020.03.06.13.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Mar 2020 13:27:51 -0800 (PST) Date: Fri, 6 Mar 2020 13:27:51 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Yang Shi cc: "Kirill A. Shutemov" , Andrew Morton , "Kirill A. Shutemov" , Mike Rapoport , Jeremy Cline , Linux Kernel Mailing List , Linux MM Subject: Re: [patch 1/2] mm, shmem: add thp fault alloc and fallback stats In-Reply-To: Message-ID: References: <20200220131202.i77zt3zj53mimrnu@box> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) 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 Fri, 6 Mar 2020, Yang Shi wrote: > > > > I think we can choose to either include file allocations into both > > > > thp_fault_alloc and thp_fault_fallback or we can exclude them from both of > > > > them. I don't think we can account for only one of them. > > > > > > How's about the 3rd option, adding THP_FILE_FALLBACK. > > > > I like this option. > > > > Problem with THP_FAULT_* is that shmem_getpage_gfp() is called not only > > from fault path, but also from syscalls. > > I found another usecase for THP_FILE_FALLBACK. I wanted to measure > file THP allocation success rate in our uecase. It looks nr_file_alloc > / (nr_file_alloc + nr_file_fallback) is the most simple way. > > David, are you still working on this patch? > Yes, I have a refresh to send out. I don't enable CONFIG_FS_DAX but the THP_FAULT_FALLBACK there seems somewhat out of place. It's not necessarily within the scope of my patchset but thought I'd mention it if someone had strong feelings about whether the DAX cases should be separated out as well.