Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp752445ybz; Wed, 15 Apr 2020 18:11:21 -0700 (PDT) X-Google-Smtp-Source: APiQypLoYxnrKLtDwTbQehF404N188lvml/4moQtFI4bg5cDSiaLbpJGYNISCY7p5olvtzqhWVQf X-Received: by 2002:a50:c3c2:: with SMTP id i2mr8314671edf.93.1586999481125; Wed, 15 Apr 2020 18:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999481; cv=none; d=google.com; s=arc-20160816; b=KWNKurFTlT2AS1u35/dMMcqzGDz/X3iW2qWQJP32B75DtVT8t1JdoVYeLhx+Y18A1J 8HsUZ+GgT8n5zQU3e8gKVzjq5BaR+jHpz4y+hNU64hmFV7K3XpdjPF+a2WIS1BR2gAJa kZjnpnk16JQ+gBjP560wxwLLg8B4ay1yQ8AbryiKD0wS0NZZtwd1vOj363ZC/D9NZgBG bLBj9lBSyzLjyLfEQFLdttrkQ23IE7tpaGn0lxL/9V0G6mr+b9zQBeMBODLjIr2MS6aT d7L/Es2a2yfr/8Fy8B/t+R0K/qhtKoM/4Q8ABUbJgyz7002srjLzSS3jpWIcGp9pecjN 0dlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IX3wruZGY7llk5Qpla+wL2jsH4dCdrR/VQCtvdqHmRU=; b=b52H5wrid3OToVU5fXyfnLBSGA0On2BkBhuaD2Z5H+tcAZYLO2h8lQrJD2fmcnn5zE lXT52X+0w23+EIk0a2t2Krp64s7qJ6o049EUXpxJ7qsaEL5eAC/Ijd+cc/jyBuPz1tmE ZgfS3uaqlDoCtXcjCFJwLT79zwMk1Q+hUT0S4lUy6WEUOH0jcN3uFdjUzL+v4I6iaymF Ba2Goa/5oOASAY+9EOD69dsdJHe0ekfATKTFCM7sWJ90FRMCmKtHJg8hwjXVBlMOYZDf oj2ziCoqa1UEXcljZyy+xgVE26IB5ID64al7ssMibk0M3syf+CTtytHq4QESq88mokKF tSSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=k6cxtDap; 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 bi17si11956053edb.370.2020.04.15.18.10.54; Wed, 15 Apr 2020 18:11:21 -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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=k6cxtDap; 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 S1730677AbgDOVwQ (ORCPT + 99 others); Wed, 15 Apr 2020 17:52:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729648AbgDOVwL (ORCPT ); Wed, 15 Apr 2020 17:52:11 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAE15C061A0C for ; Wed, 15 Apr 2020 14:52:08 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id l14so5507043ljj.5 for ; Wed, 15 Apr 2020 14:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IX3wruZGY7llk5Qpla+wL2jsH4dCdrR/VQCtvdqHmRU=; b=k6cxtDappj81zBUBPie6lxpMF2nrL97TYrGrAUOqCxfT4ky97R2Q3AeRJ4OedvXDUb Z03X1+zL+NZq5pX5Kud2gRwyHgVI17jNHK6K0umHL2Rq5ffhAB0igQul8/tH9U+BnEi8 ZMDbunyV3k1qL1EQXP4oRETQw/GSz9tJqz+8t0EhoJ1acPcpERKWqjkHuuuJUGRwEVCI claL8VjyEGg/JVKhIdUcn3GS+tjGqCzn8YJ8Pi0tUwYE9EkTSiRe/wsgRZRVLOn47SIC 9MhqsjBDY0opeQ0rCR1PwSRIi79wRW+/Qkh81mRYp4/CkCGXvsxROPLLF61tXqBq5MjN km1g== 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:message-id:references :mime-version:content-disposition:in-reply-to; bh=IX3wruZGY7llk5Qpla+wL2jsH4dCdrR/VQCtvdqHmRU=; b=tc7QJsQfK292iP8De9cXZJAWJnUfiqupRy8rCGLNKui3tvbMXMO7ihyqMfPF4spv0u 6CecuOfdzHupKQxpEFFCC0PutY5osowe+AT5LlMuj301wTepWxs+9/deVIY0QR6lfz1E 6uFYjiZLyqX6Da7pascYMwmsWjk2kB0h7ivUs/lSclrv6uUFgw/oGI8ZOAi+3nYC4u5z Eon4e2fHn0eljx2mTsNYhJTUGvjCeCssgEBwI9fQmQ18q+J9S+p+pU8Kj1tvNMnQJsEu B2DUht/W+csB2rD8TCoQcZgfdPlVFMMlHVC3Aw9BZiUFfk4jrSJTeb3si6sSXRomufMN 4LjA== X-Gm-Message-State: AGi0PuabcCMeO0oUOb3mC1vZWhu5vgeKrWhAT1dVF7MooqiVowtz3RD+ gYKa4uGSdAYErdcUMSh084kExw== X-Received: by 2002:a2e:140e:: with SMTP id u14mr2981970ljd.252.1586987527267; Wed, 15 Apr 2020 14:52:07 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id x24sm13542101lfc.6.2020.04.15.14.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 14:52:06 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id D17A7102C64; Thu, 16 Apr 2020 00:52:05 +0300 (+03) Date: Thu, 16 Apr 2020 00:52:05 +0300 From: "Kirill A. Shutemov" To: Andrew Morton 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: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200415144426.a146ef173140f5bc396a6dcd@linux-foundation.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Kirill A. Shutemov