Re: [PATCH -mm] mm: more likely reclaim MADV_SEQUENTIAL mappings



On Tuesday 22 July 2008 01:14, Rik van Riel wrote:
On Mon, 21 Jul 2008 15:49:00 +1000

Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:
It is already bad because: if you are doing a big streaming copy
which you know is going to blow the cache and not be used again,
then you should be unmapping behind you as you go.

MADV_SEQUENTIAL exists for a reason.

AFAIKS it is to open up readahead mainly. Because it is quite reasonable
to otherwise be much more conservative about readahead than with regular
reads (and of course you can't do big chunks per kernel entry)...

I don't actually care what the man page or posix says if it is obviously
silly behaviour. If you want to dispute the technical points of my post,
that would be helpful.


If you think that doing an automatic unmap-behind will be
a better way to go, we can certainly whip up a patch for
that...

I don't. Don't let me stop you trying of course :)

Consider this: if the app already has dedicated knowledge and
syscalls to know about this big sequential copy, then it should
go about doing it the *right* way and really get performance
improvement. Automatic unmap-behind even if it was perfect still
needs to scan LRU lists to reclaim.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH/RFC] Simplified Readahead
    ... >>would like to offer up an alternative simplified design which will not ... and the readahead thrashing is in there. ... piece missing is double lookups on cache hits. ... >>Reducing the size of the ahead window doesn't help. ...
    (Linux-Kernel)
  • Re: [PATCH/RFC] Simplified Readahead
    ... > The key design point of the new design is to make the readahead code ... > aware of the size of the I/O request. ... > The first of these is a file already residing in page cache. ... next_size is 'n' then if the next 'n' window reads are already ...
    (Linux-Kernel)
  • Re: [PATCH/RFC] Simplified Readahead
    ... >> The key design point of the new design is to make the readahead code ... >> The first of these is a file already residing in page cache. ... Looked at your code to see how you handled page cache hits, ... >> Reducing the size of the ahead window doesn't help. ...
    (Linux-Kernel)
  • [PATCH] spelling fixes: mm/
    ... If the zonelist cache is present in the passed in zonelist, ... - * not for each call to readahead. ... The code ramps up the size aggressively at first, ... + * This initializes kmem_list3 or resizes various caches for all nodes. ...
    (Linux-Kernel)
  • Re: [QUICKLIST 0/4] Arch independent quicklists V2
    ... Sure, that is a minor detail, considering that you'll usually be allocating ... reason to be upset. ... And you want to allocate cache cold pages as well, ... known-zero, cache-hot page into the pagetable quicklists, you still have ...
    (Linux-Kernel)