From: Andrew Morton <akpm@osdl.org>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@osdl.org, davidm@snapgear.com, linux-kernel@vger.kernel.org
Subject: Re: Improving mmap() support for !MMU further
Date: Wed, 2 Mar 2005 09:07:34 -0800 [thread overview]
Message-ID: <20050302090734.5a9895a3.akpm@osdl.org> (raw)
In-Reply-To: <9420.1109778627@redhat.com>
David Howells <dhowells@redhat.com> wrote:
>
>
> Hi Linus,
>
> I'd like to improve mmap() support on !MMU still further by overloading struct
> backing_dev_info::memory_backed to hold flags describing what the backing
> device is capable of with respect to direct memory access.
->memory_backed is already overloaded in various awkward ways. It would be
good to fix that up first, then add enhancements in a later patch.
Furthermore I'd suggest that we remove ->memory_backed and simply add a
bunch of new booleans to backing_dev_info rather than futzing with
bitflags. Those booleans could be bitfields, of course.
And those fields should refer to device capabilities and not to device
characteristics: "what it can do" rather than "what it is". So
"contributes to dirty memory" and "needs writeback" are good and "is a ram
disk thingy" is bad.
So in 2.6.11 as-is, we have:
bdi->dirty_memory_acct Contributes to dirty memory accounting
bdi->needs_writeback Needs writeback
> (*) If bdi->memory_backed is 0, then the backing device is not accessible as
> memory.
Not sure what this means.
> (*) If the bdi->memory_backed is non-zero, then it's a bit mask of the
> following:
>
> #define BDI_NO_WRITEBACK 0x00000001
Invert the sense of this, use ->needs_writeback
> #define BDI_MEMORY_BACKED 0x00000001
Lose this.
> #define BDI_CAN_MAP_DIRECT 0x00000002
bdi->can_map_direct
> #define BDI_CAN_MAP_COPY 0x00000004
bdi->can_map_copy
> #define BDI_CAN_READ_MAP VM_MAYREAD
> #define BDI_CAN_WRITE_MAP VM_MAYWRITE
> #define BDI_CAN_EXEC_MAP VM_MAYEXEC
A separate field in backing_dev_info?
That `membacked' stuff in the !NOMMU implementation of do_mmap_pgoff()
looks like it could benefit from some rework as a result of the above as
well. It all looks rather inferential.
next prev parent reply other threads:[~2005-03-02 17:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-02 15:50 David Howells
2005-03-02 17:07 ` Andrew Morton [this message]
2005-03-02 21:34 ` [PATCH 1/2] BDI: Provide backing device capability information David Howells
2005-03-02 21:51 ` Andrew Morton
2005-03-02 22:28 ` Linus Torvalds
2005-03-02 22:39 ` Andrew Morton
2005-03-03 13:42 ` David Howells
2005-03-03 20:33 ` Andrew Morton
2005-03-03 13:38 ` David Howells
2005-03-03 20:34 ` Andrew Morton
2005-03-07 11:23 ` David Howells
2005-03-07 11:37 ` Andrew Morton
2005-03-07 11:43 ` David Howells
2005-03-07 11:47 ` Andrew Morton
2005-03-07 11:51 ` David Howells
2005-03-07 12:10 ` Andrew Morton
2005-03-07 12:25 ` David Howells
2005-03-07 14:05 ` David Howells
2005-03-07 15:21 ` Miklos Szeredi
2005-03-07 15:41 ` David Howells
2005-03-07 15:45 ` Miklos Szeredi
2005-03-07 16:06 ` David Howells
2005-03-07 16:15 ` Miklos Szeredi
2005-03-07 20:14 ` Andrew Morton
2005-03-08 14:12 ` [PATCH 1/2] BDI: Provide backing device capability information [try #3] David Howells
2005-03-09 0:37 ` Andrew Morton
2005-03-09 10:27 ` David Howells
2005-03-02 21:41 ` [PATCH 2/2] BDI: Improve nommu mmap support David Howells
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=20050302090734.5a9895a3.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=davidm@snapgear.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®