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 X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A006C4360F for ; Thu, 14 Feb 2019 22:29:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E349C21B18 for ; Thu, 14 Feb 2019 22:29:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="zMmXsWNa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393577AbfBNW3u (ORCPT ); Thu, 14 Feb 2019 17:29:50 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:44021 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389557AbfBNW3t (ORCPT ); Thu, 14 Feb 2019 17:29:49 -0500 Received: by mail-pl1-f195.google.com with SMTP id f90so3879433plb.10 for ; Thu, 14 Feb 2019 14:29:49 -0800 (PST) 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:user-agent; bh=NvjkFmreiSParKFafQcGiRdK5zDzo6y3sTnyvcFNMzU=; b=zMmXsWNaqFgtURCjoEYmlG9ZootJV5ETk7RClqRFNaN8UtvsHttKiTduUB2vRFLESU Irv8uNMRW39/Dt4ph9ebsvwqiek11zObnThfoX3rv9ZPb9vmkPWCpfV53nTW18dGR9On Vi0iJd7SX6A7bQ5zmpinCi7IZXHRVufYoUWYHI7cpK3R4scCSdUtlFJH98y5l/CDRtfg sn7DnsR8Gb2ZciO30zpSgCP6vnc4KosNxCn+DbhIK0angJilTkL5hmoRLTXPXjC1/KPX Uy8melJuZm8a6jnjud5Fv/KJfyUlcg9KVPdEXDUPKkxb3klzdSxmDy5Er2KOBNYHafdV uA9w== 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:user-agent; bh=NvjkFmreiSParKFafQcGiRdK5zDzo6y3sTnyvcFNMzU=; b=raCtcmpK5lcvQWP1KqOfgn7J/TbvRC6vFI2Dv3uIdZLVthk/erYgBtbvyKtJvW3Ffc lBVm1DqWY4gR4b87RiptH/Uy5y5bvawxRVFXA8fPxVEyHCANBEcHM3hQKcoCO0DW/l5z ziNt39Zlg0WOAxnsNz/qoDBzcB/ew53LmEC1kpH7Y1vNh4uXECxBzd/R1Z7ADYQKXIzy FrlSZWpqvOzSF+PibZF6E1IAW1uyuNCzZmWsR3BgS6OHQVgkqVfSjoe6ZoaFBiezUS8s ext5rVik41gs2ZVKl8GbNjzg5U7keeWLT88EPXjLEv5XNd70hM7GaHyMj4tQv48IBLyw J/lw== X-Gm-Message-State: AHQUAubPtjwrGW5zfjKblcCvn4YacSEzZ9Hbq0k3TYvGrQLhY36EEYtj oLAFsy97XV7JoEls86uqJm5gvA== X-Google-Smtp-Source: AHgI3IbRwfPTP/Y0Xv5KT7Y/ZfnHrmYGt49yZlShyrIq2MoJyVHHOX2q/yx+7hvTOo/tOTXaLI+zsA== X-Received: by 2002:a17:902:108a:: with SMTP id c10mr6737872pla.131.1550183388999; Thu, 14 Feb 2019 14:29:48 -0800 (PST) Received: from kshutemo-mobl1.localdomain ([134.134.139.83]) by smtp.gmail.com with ESMTPSA id i186sm6122051pfc.28.2019.02.14.14.29.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 14:29:48 -0800 (PST) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id E68993008A8; Fri, 15 Feb 2019 01:29:44 +0300 (+03) Date: Fri, 15 Feb 2019 01:29:44 +0300 From: "Kirill A. Shutemov" To: Matthew Wilcox Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Hugh Dickins , William Kucharski Subject: Re: [PATCH v2] page cache: Store only head pages in i_pages Message-ID: <20190214222944.74ipvbnvo2lvfgnr@kshutemo-mobl1> References: <20190212183454.26062-1-willy@infradead.org> <20190214133004.js7s42igiqc5pgwf@kshutemo-mobl1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190214133004.js7s42igiqc5pgwf@kshutemo-mobl1> User-Agent: NeoMutt/20180716 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Feb 14, 2019 at 04:30:04PM +0300, Kirill A. Shutemov wrote: > On Tue, Feb 12, 2019 at 10:34:54AM -0800, Matthew Wilcox wrote: > > Transparent Huge Pages are currently stored in i_pages as pointers to > > consecutive subpages. This patch changes that to storing consecutive > > pointers to the head page in preparation for storing huge pages more > > efficiently in i_pages. > > > > Large parts of this are "inspired" by Kirill's patch > > https://lore.kernel.org/lkml/20170126115819.58875-2-kirill.shutemov@linux.intel.com/ > > > > Signed-off-by: Matthew Wilcox > > I believe I found few missing pieces: > > - page_cache_delete_batch() will blow up on > > VM_BUG_ON_PAGE(page->index + HPAGE_PMD_NR - tail_pages > != pvec->pages[i]->index, page); > > - migrate_page_move_mapping() has to be converted too. Other missing pieces are memfd_wait_for_pins() and memfd_tag_pins() We need to call page_mapcount() for tail pages there. -- Kirill A. Shutemov