Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp755452ybz; Wed, 15 Apr 2020 18:15:14 -0700 (PDT) X-Google-Smtp-Source: APiQypKDTrdLGtb0Y0FNRP41ynQG9AAIchzq5kghNqayReNb+y+9YCDOqDlIbY6GhtX6a3gD1dN0 X-Received: by 2002:a05:6402:31b6:: with SMTP id dj22mr15916773edb.258.1586999714580; Wed, 15 Apr 2020 18:15:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999714; cv=none; d=google.com; s=arc-20160816; b=LlW/Xr7FsKmyuOHAmUsqK1nQgJ0oisoAnZyGUfZCD/jIK/qADIipqS4A3jDFYCEeKY +9cEZe8xdF5b6dZQR1ubDp3zPU6jNSoLrtrUqac8GnAFiYiP0Sba9AXf6iejNF6kRD8X Nt6R3a6pmYjJkKYYeBj+k9KDTHvLKvpVVOzhPEPq6trALGfqTi2X0WITTgubrkCRsAEV k5SIaeCIfsJR4YqvBfPMxSraTxppkDoaD1T2FYaPaYcNqQHASx1zHfaUEWWFm/YvDREH FsuR3ygmA0z3v8vJ5QDMuZbgGrydJaiq/jcGbN2F8+oYhDu4Xw+FUpRqcPVJZA+qZpVT vv/w== 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=GrILeADJvfMn1EclVtzFr2m7QchFBUJyPdxcfy8ugeg=; b=zRmBgYsNPBuqPw9/q+UcrIKvqtb67oh4tG6UYRg4gBXtHFn735lyAjVmU9v/j3xw38 FeK2TpbJ8Gg0P8L7zNYEulEnTwHd1790XXBNT1K6gRzfS4a0vlIMPzoWNjwwDHvPh+70 m2jU5uVUZ1ykBTWqUzMcoigt6kJONvRXnwCLhZMQgEcEU9LL6sO7Fw+1b5u9qDu+Jz0w +2/Yv0mhCLsqqFg/Q8EFS8/PZtCFpP2VqBRXl8PmIBq/AZ1+KWjjqaRxg9+YaUrVCnts bvDBO7HtH3ME1H6wkn9B5cWLOChvtKF0Ve/2FJUAyjDCFXhHwiUisGPCX171cvwSm/Wa Bm5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DIObiXjJ; 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 i18si10978796ejx.488.2020.04.15.18.14.51; Wed, 15 Apr 2020 18:15:14 -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=@kernel.org header.s=default header.b=DIObiXjJ; 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 S1732954AbgDOWxH (ORCPT + 99 others); Wed, 15 Apr 2020 18:53:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:35920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbgDOWxB (ORCPT ); Wed, 15 Apr 2020 18:53:01 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (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 154B32076D; Wed, 15 Apr 2020 22:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586991180; bh=WdDt++T0TbKV96xjyLypO9w7oBncQPpiZTQa5qF/uEk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DIObiXjJioAOylPSwb0uL8ZY5Jwv8Walwio8CdnTXmOhiWN8gyyAgoGVZGkMpaA4t 07pbJX77HmtdWrT+ZbXYCTIJcefzia9KIUsWVkIvYME/dHKVqFQzERCUjjUcp2VTzF pgVIjOakDbN+TjBYQ9w/O6i/Rke3pMTE6SIM5lqk= Date: Wed, 15 Apr 2020 15:52:59 -0700 From: Andrew Morton To: "Kirill A. Shutemov" Cc: "Kirill A. Shutemov" , Andrea Arcangeli , Zi Yan , Yang Shi , Ralph Campbell , John Hubbard , William Kucharski , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv3, RESEND 6/8] khugepaged: Allow to collapse PTE-mapped compound pages Message-Id: <20200415155259.8be9887c64b1420cfc9b9655@linux-foundation.org> In-Reply-To: <20200415215205.eaihc5snfe4ffhju@box> References: <20200413125220.663-1-kirill.shutemov@linux.intel.com> <20200413125220.663-7-kirill.shutemov@linux.intel.com> <20200415144426.a146ef173140f5bc396a6dcd@linux-foundation.org> <20200415215205.eaihc5snfe4ffhju@box> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; 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 Thu, 16 Apr 2020 00:52:05 +0300 "Kirill A. Shutemov" wrote: > On Wed, Apr 15, 2020 at 02:44:26PM -0700, Andrew Morton wrote: > > On Mon, 13 Apr 2020 15:52:18 +0300 "Kirill A. Shutemov" wrote: > > > > > We can collapse PTE-mapped compound pages. We only need to avoid > > > handling them more than once: lock/unlock page only once if it's present > > > in the PMD range multiple times as it handled on compound level. The > > > same goes for LRU isolation and putback. > > > > > > ... > > > > > > --- a/mm/khugepaged.c > > > +++ b/mm/khugepaged.c > > > @@ -515,17 +515,30 @@ void __khugepaged_exit(struct mm_struct *mm) > > > > > > static void release_pte_page(struct page *page) > > > { > > > - dec_node_page_state(page, NR_ISOLATED_ANON + page_is_file_cache(page)); > > > > I have > > > > dec_node_page_state(page, NR_ISOLATED_ANON + page_is_file_lru(page)); > > > > here. Is there some prerequisite which I wasn't able to find? > > The patchset is on top of v5.6. It has been changed since. See > 9de4f22a60f7 ("mm: code cleanup for MADV_FREE"). > > Look like a trivial fixup is required. [7/8] makes a big mess. Can we please have a v4?