linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC] On paging of kernel VM.
Date: Mon, 09 Sep 2002 12:24:40 +0100	[thread overview]
Message-ID: <28099.1031570680@redhat.com> (raw)
In-Reply-To: <20020909121348.B4855@redhat.com>

sct@redhat.com said:
>  The alternative is a kmap-style mechanism for temporarily mapping
> pages beyond physical memory on demand.

That's a possibility I'd considered, but in this case there are problems
with explicitly mapping and unmapping the pages. The locking of the chip is
a detail I was hoping to avoid exposing to the users of the device. 

With mapping/unmapping done explicitly, not only does an active mapping
prevent all other users from writing to the same device, hence requiring a
'cond_temporarily_unmap()' kind of function, but you also get deadlock if a
user of the device tries to write while they have a mapping active. The
answer "don't do that then" is workable but not preferable. 

Given that all the logic to mark pages present on read and then invalidate
them on write access is going to have to be there for userspace _anyway_,
being able to keep the API nice and simple by using that in kernelspace too
would be far better, if we can justify the change to the slow path of the 
vmalloc fault case.

But yes, what you suggest is the current API for the flash stuff, sans the 
'cond_temporarily_unmap_if_people_are_waiting()' bit. And that's why I've 
avoided actually _using_ it, preferring to put up with the overhead of 
reading into a RAM buffer until we can fix it.

--
dwmw2


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

  parent reply	other threads:[~2002-09-09 11:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-09  9:20 David Woodhouse
2002-09-09 11:13 ` Stephen C. Tweedie
2002-09-09 11:24 ` David Woodhouse [this message]
2002-09-10  0:28 ` Daniel Phillips
2002-09-10  6:08 ` David Woodhouse

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=28099.1031570680@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sct@redhat.com \
    /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