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] [thread-next>] [day] [month] [year] [list]
Message-ID: <03aa047b-4e52-d5fb-c212-b341df4ea07f@linux.alibaba.com>
Date:   Tue, 17 Mar 2020 12:28:49 -0700
From:   Yang Shi <yang.shi@...ux.alibaba.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     shakeelb@...gle.com, vbabka@...e.cz, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [v3 PATCH 1/2] mm: swap: make page_evictable() inline



On 3/17/20 12:04 PM, Matthew Wilcox wrote:
> On Wed, Mar 18, 2020 at 01:42:50AM +0800, Yang Shi wrote:
>> v3: * Fixed the build error reported by lkp.
> I'm not terribly enthusiastic about including pagemap.h from swap.h.
> It's a discussion that reasonable people can disagree about, so let's
> set it up:
>
> This patch adds inline bool page_evictable(struct page *page) to swap.h.
> page_evictable() uses mapping_evictable() which is in pagemap.h.
> mapping_evictable() uses AS_UNEVICTABLE which is also in pagemap.h.
>
> We could move mapping_evictable() and friends to fs.h (already included
> by swap.h).  But how about just moving page_evictable() to pagemap.h?
> pagemap.h is already included by mm/mlock.c, mm/swap.c and mm/vmscan.c,
> which are the only three current callers of page_evictable().
>
> In fact, since it's only called by those three files, perhaps it should
> be in mm/internal.h?  I don't see it becoming a terribly popular function
> to call outside of the core mm code.
>
> I think I have a mild preference for it being in pagemap.h, since I don't
> have a hard time convincing myself that it's part of the page cache API,
> but I definitely prefer internal.h over swap.h.

Thanks for the suggestion. Will move it to pagemap.h


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ