From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF5EDC433F5 for ; Tue, 12 Oct 2021 12:44:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 608AF61039 for ; Tue, 12 Oct 2021 12:44:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 608AF61039 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id BDE446B006C; Tue, 12 Oct 2021 08:44:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B6676900002; Tue, 12 Oct 2021 08:44:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A076A6B0073; Tue, 12 Oct 2021 08:44:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id 8C67C6B006C for ; Tue, 12 Oct 2021 08:44:50 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 294AD18209AB6 for ; Tue, 12 Oct 2021 12:44:50 +0000 (UTC) X-FDA: 78687754740.12.041A562 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf03.hostedemail.com (Postfix) with ESMTP id 2ACDA30000A6 for ; Tue, 12 Oct 2021 12:44:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fs/MX5SszswqpeGNl8Ck0CoDmx06jLPiMI+4u0nlpGU=; b=Kf3LiAw9fYZHdjY8uctjTofZTW 8A3czTTk1/bsdxmCYqI81LKa4b3Vwu1kW0Az++7nfhB3D/kcIfzv/5s9/8U4Sb07CnF/JfRSSL69J 7pAhpEEzbI/IdX2lNLaVlXgcwUDKII8rfbiPHlP8sdenBZtwXutt+7Lrm29KtH9ndEBrWLfXjat5P AsYD4wwQPQ8pvXQY39dzYpxvobqE7WRf4m/O6oSdeN6PDM1wN4I++FRwdmfJE6lzhiQ5KNw8wcNJU szKyHsUO8CoZkhoPkzSWcaH5TUhpo085OsJq4zzbB0CUQc2CBzFopmloDqOccacwFfZapy+GwJwle gu6adehQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1maH83-006VWb-27; Tue, 12 Oct 2021 12:43:53 +0000 Date: Tue, 12 Oct 2021 13:43:35 +0100 From: Matthew Wilcox To: Marek Szyprowski Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , =?utf-8?B?6rmA7ISx7ZuI?= , Song Liu , Rik van Riel , "Kirill A . Shutemov" , Johannes Weiner , Hillf Danton , Hugh Dickins , William Kucharski , Oleg Nesterov , Yang Shi Subject: Re: [PATCH] mm/thp: decrease nr_thps in file's mapping on THP split Message-ID: References: <20211012120237.2600-1-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211012120237.2600-1-m.szyprowski@samsung.com> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 2ACDA30000A6 X-Stat-Signature: gb3pau73jxkx84id8is1ipd1ud6aosw3 Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Kf3LiAw9; dmarc=none; spf=none (imf03.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1634042689-151933 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Oct 12, 2021 at 02:02:37PM +0200, Marek Szyprowski wrote: > Decrease nr_thps counter in file's mapping to ensure that the page cache > won't be dropped excessively on file write access if page has been > already splitted. > > Signed-off-by: Marek Szyprowski > Fixes: 09d91cda0e82 ("mm,thp: avoid writes to file with THP in pagecache") > Fixes: 06d3eff62d9d ("mm/thp: fix node page state in split_huge_page_to_list()") > --- > I've analyzed the code a few times but either I missed something or the > nr_thps counter is not decremented during the THP split on non-shmem file > pages. This looks OK to me, but have you tested it? If so, what workload did you use? The way you wrote this changelog makes it sound like you only read the code and there have been rather too many bugs introduced recently that way :-(