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: <8762n7kvym.fsf@cmungerjr.com>
Date:	Tue, 12 Jul 2011 14:52:49 -0700
From:	"Patrick J. LoPresti" <lopresti@...il.com>
To:	Andrea Righi <andrea@...terlinux.com>
CC:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH v3 0/2] fadvise: support POSIX_FADV_NOREUSE


> IIUC, NOREUSE means "the application will use this range of the file
> once". It's something that we do _before_ accessing the file.  And the
> kernel needs to remember the ranges of NOREUSE data for each file, so
> that page cache can be immediately dropped after the data has been
> accessed (if possible).

I am no expert on the Linux page cache, but my applications have a great
interest in exercising some control over it...

Could NOREUSE be as simple as setting a bit on the page that means
"never mark this page active"?

Or more conservatively, "clear this bit before marking the page active"?

So POSIX_FADV_NOREUSE would set the bit on the page.  Then any operation
that would normally mark the page active would instead merely clear the
bit.  This would keep the page on the inactive list _after_ the first
read and allow it to be reclaimed, which is at least in the "spirit" of
NOREUSE.

 - Pat
--
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