From: Linus Torvalds <torvalds@transmeta.com>
To: Ben LaHaise <bcrl@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Alexander Viro <viro@math.psu.edu>
Subject: Re: [wip-PATCH] rfi: PAGE_CACHE_SIZE suppoort
Date: Wed, 4 Jul 2001 22:55:31 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.33.0107042247230.21720-100000@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0107050054470.5548-100000@toomuch.toronto.redhat.com>
On Thu, 5 Jul 2001, Ben LaHaise wrote:
>
> I attacked the PAGE_CACHE_SIZE support in the kernel for the last few days
> in an attempt to get multipage PAGE_CACHE_SIZE support working and below
> is what I've come up with. It currently boots to single user read only,
> doesn't quite have write support fixed properly yet, but is going pretty
> well. The reason for sending this out now is the question of what to do
> about kmap() support.
I suggest making kmap _always_ map the "biggest" chunk of physical memory
that the kernel ever touches at a time.
So I would _strongly_ suggest that you make the kmap granularity be at
_least_ PAGE_CACHE_SIZE. For debugging reasons I would suggest you have a
separate "PAGE_KMAP_SIZE" thing, so that you can get the kmap code working
independently of the PAGE_CACHE_SIZE thing.
Once you have the guarantee that "kmap(page)" will actually end up mapping
the (power-of-two-aligned) power-of-two-sized PAGE_KMAP_SIZE around the
page, the loops should all go away, and you should be able to use kmap()
the same way you've always used it (whether the user actually cares about
just one page or not ends up being a non-issue).
> - filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset;
> + filp->f_pos = (n << PAGE_SHIFT) | offset;
You're definitely doing something wrong here.
You should _never_ care about PAGE_SHIFT, except in the case of a mmap()
where you obviously end up mapping in "partial" page-cache pages. I
suspect you're doing all this exactly because of the kmap issue, but you
really shouldn't need to do it.
The whole point with having a bigger page-cache-size is to be able to
process bigger chunks at a time.
Now, one thing you might actually want to look into is to make the dirty
bit be a "dirty bitmap", so that you have the option of marking things
dirty at a finer granularity. But that, I feel, is after you've gotten the
basic stuff working with a PAGE_CACHE_SIZE dirty granularity.
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-mm.org/
next prev parent reply other threads:[~2001-07-05 5:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-05 5:06 Ben LaHaise
2001-07-05 5:55 ` Linus Torvalds [this message]
2001-07-05 16:45 ` Large PAGE_SIZE Hugh Dickins
2001-07-05 17:13 ` Linus Torvalds
2001-07-05 18:38 ` Hugh Dickins
2001-07-05 18:53 ` Linus Torvalds
2001-07-05 20:41 ` Ben LaHaise
2001-07-05 20:59 ` Hugh Dickins
2001-07-06 5:11 ` Linus Torvalds
2001-07-09 3:04 ` [wip-PATCH] " Ben LaHaise
2001-07-09 11:18 ` Hugh Dickins
2001-07-09 13:13 ` Jeff Garzik
2001-07-09 14:18 ` Hugh Dickins
2001-07-09 14:33 ` Jeff Garzik
2001-07-09 17:21 ` Hugh Dickins
2001-07-10 5:53 ` Ben LaHaise
2001-07-10 16:42 ` Hugh Dickins
2001-07-18 0:02 ` Hugh Dickins
2001-07-18 18:48 ` Hugh Dickins
2001-07-22 23:08 ` Hugh Dickins
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.33.0107042247230.21720-100000@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=bcrl@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=viro@math.psu.edu \
/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