lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANN689Gvf9SeF9PG+8f_eBBM4vZLyroRr2nhjTcqiHuja-WUSQ@mail.gmail.com>
Date:	Wed, 20 Feb 2013 00:12:11 +0800
From:	Michel Lespinasse <walken@...gle.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>, linux-mm@...ck.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Wu Fengguang <fengguang.wu@...el.com>, Jan Kara <jack@...e.cz>,
	Nick Piggin <npiggin@...nel.dk>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Andi Kleen <ak@...ux.intel.com>,
	"Kirill A. Shutemov" <kirill@...temov.name>
Subject: Re: PAGE_CACHE_SIZE vs. PAGE_SIZE

On Fri, Feb 1, 2013 at 6:40 AM, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Fri, 18 Jan 2013 17:57:25 +0200
> "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com> wrote:
>
>> Hi,
>>
>> PAGE_CACHE_* macros were introduced long time ago in hope to implement
>> page cache with larger chunks than one page in future.
>>
>> In fact it was never done.
>>
>> Some code paths assume PAGE_CACHE_SIZE <= PAGE_SIZE. E.g. we use
>> zero_user_segments() to clear stale parts of page on cache filling, but
>> the function is implemented only for individual small page.
>>
>> It's unlikely that global switch to PAGE_CACHE_SIZE > PAGE_SIZE will never
>> happen since it will affect to much code at once.
>>
>> I think support of larger chunks in page cache can be in implemented in
>> some form of THP with per-fs enabling.
>>
>> Is it time to get rid of PAGE_CACHE_* macros?
>> I can prepare patchset if it's okay.
>
> The distinct PAGE_CACHE_SIZE has never been used for anything, but I do
> kinda like it for documentary reasons: PAGE_SIZE is a raw, low-level
> thing and PAGE_CACHE_SIZE is the specialized
> we're-doing-pagecache-stuff thing.
>
> But I'm sure I could get used to not having it ;)

Personally I always find such distinctions without a difference - like
page_cache_release vs put_page - rather confusing, especially when
working near the fs/mm boundary (for example in and under
handle_pte_fault())

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ