From: Linus Torvalds <torvalds@transmeta.com>
To: James Manning <jmm@computer.org>
Cc: linux-mm@kvack.org
Subject: Re: a plea for mincore()/madvise()
Date: Fri, 10 Mar 2000 13:13:42 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.10.10003101304430.2499-100000@penguin.transmeta.com> (raw)
In-Reply-To: <20000310152650.A14388@nina.pagesz.net>
On Fri, 10 Mar 2000, James Manning wrote:
>
> I'm certainly sure there's all kinds of other areas where mincore() and
> madvise() are very helpful.
I agree especially for madvice, but I haven't liked the patches that I've
seen so far.
I don't like exporting the silly user-land "advice" into the
vma->vm_flags. I like "flags" as flags, and I'd be happy to have bit
positions saying
if (vma->vm_flags & VM_SEQUENTIAL) {
.. pre-fetch aggressively ..
}
and then the madvise() system call would do somehting like
switch (advice) {
MADV_SEQUENTIAL:
/* This is really more of a "mprotect" thing */
mprotect(start, end, VM_SEQUENTIAL);
break;
MADV_DONTNEED:
/* While this is really a case of msync() */
msync(start, end, MSYNC_THROWAWAY);
break;
...
instead of just trying to force the madvise() system call into the VM
structure, where I don't think it makes all that much sense.
MADV_DONTNEED really is NOT a vma flag at all. It really is what Linux
tends to call MS_INVALIDATE for msync() (which is probably wrong, I don't
know how anybody else does this).
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next parent reply other threads:[~2000-03-10 21:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20000310152650.A14388@nina.pagesz.net>
2000-03-10 21:13 ` Linus Torvalds [this message]
2000-03-10 21:36 ` Chuck Lever
2000-03-10 21:46 ` Linus Torvalds
2000-03-10 23:41 ` Chuck Lever
2000-03-11 0:14 ` Linus Torvalds
2000-03-11 0:39 ` Chuck Lever
2000-03-11 14:14 ` Christoph Rohland
2000-03-13 8:43 ` Richard Guenther
2000-03-13 16:03 ` Stephen C. Tweedie
2000-03-13 17:20 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.10.10003101304430.2499-100000@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=jmm@computer.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox