Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2393565pxb; Tue, 12 Oct 2021 05:47:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTFNc/RvPSfX+r6WbqTrl1S+N2S8x7+jqOV7X8rPPr58zdOPVeTkwemAmqXrfU2nGWRgFi X-Received: by 2002:a05:6402:16d2:: with SMTP id r18mr50908922edx.363.1634042857074; Tue, 12 Oct 2021 05:47:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634042857; cv=none; d=google.com; s=arc-20160816; b=S7YvC6hEvfJgUttI0F99I+kRDdKnikkxnV9HxQ2L8KVE4URvj9iEh81+A0/M/x5K19 l+VnHSIg1augCcCI3yHEQ3x5HouQqw4NmhZmcCs+HP5Iy4X6a0cMwX7m6kQxM3kUraDj 3/DidMt7idnegsTAJO1GeE2bqZ2ihJ4A9owC7fkQTRircQJFWkgFej1JBWX6bpCdiziO 99wkkP5gYi5G+nlPPrZQChPStZBDrQLbiT6lKExPFwHFjCZQnGLAuzUT8hw/4/9du+CS SA1uKMYjOemRCeVUKvSJIrIhD5KjhYz4GHiSXUfMYOYVkt2o+WD9fVmnJLximrga2EsF QevQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fs/MX5SszswqpeGNl8Ck0CoDmx06jLPiMI+4u0nlpGU=; b=sQJ4k28dKGfh/RDLu4Pcw/2aeYKFpYrDLXLPXd3BZ2zfh3+E6TEezfFTm2nDtxU6LJ v4pb+muyV8vtQlvI0D5m2H8O1OiCuucpJhDaPpGQe1hFFA9FneJtK4XFN4YRbj/J5e0I DPb8gl4eUWRUzV6Hp46H+AYMgOxSbLn10+Ij+XYT94DPesIKlZRCZZ6IIcQRtc/BD4c4 p3z1XrqTmEUcOS1Ae9y0U3SXCXYuC6IsC7Yd6ShMovnZWqjZ3iwpT9Y0MSMPhz7lyvdd UJXqX74LvKd3qlDPoBIpiMH/fRSOFMHgjc5Ds1CWXQFL2I+WU0LxbQgntM5yboY7pPkc 9Nsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Kf3LiAw9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si23690434edc.234.2021.10.12.05.47.11; Tue, 12 Oct 2021 05:47:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Kf3LiAw9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236368AbhJLMrJ (ORCPT + 99 others); Tue, 12 Oct 2021 08:47:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232906AbhJLMrI (ORCPT ); Tue, 12 Oct 2021 08:47:08 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D540DC061570 for ; Tue, 12 Oct 2021 05:45:06 -0700 (PDT) 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :-(