Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758601AbcCVKlY (ORCPT ); Tue, 22 Mar 2016 06:41:24 -0400 Received: from mga03.intel.com ([134.134.136.65]:30633 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756561AbcCVKlS (ORCPT ); Tue, 22 Mar 2016 06:41:18 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,376,1455004800"; d="scan'208";a="768946643" Date: Tue, 22 Mar 2016 13:41:13 +0300 From: "Kirill A. Shutemov" To: Christoph Lameter Cc: Andrew Morton , Alexander Viro , Linus Torvalds , Matthew Wilcox , Hugh Dickins , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 0/3] fs, mm: get rid of PAGE_CACHE_* and page_cache_{get,release} macros Message-ID: <20160322104113.GA143214@black.fi.intel.com> References: <1458561998-126622-1-git-send-email-kirill.shutemov@linux.intel.com> <20160321163404.GA141069@black.fi.intel.com> <20160321170655.GA141158@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 569 Lines: 19 On Mon, Mar 21, 2016 at 12:29:34PM -0500, Christoph Lameter wrote: > On Mon, 21 Mar 2016, Kirill A. Shutemov wrote: > > > We do have two page sizes in the page cache. It's the only option to get > > transparent huge pages transparent. > > Should then not PAGE_CACHE_SIZE take a page parameter and return the > correct page size? Why? What would you achieve by this? We already have a way to find out size of page: compoun_order() or hpage_nr_pages(). And not in every place where PAGE_CACHE_SIZE is used we have corresponding struct page. -- Kirill A. Shutemov