public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Mark Hemment <markhe@veritas.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	MOLNAR Ingo <mingo@chiara.elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] copy_from_high_bh
Date: Mon, 9 Jul 2001 01:33:19 +0200	[thread overview]
Message-ID: <20010709013319.C20908@athlon.random> (raw)
In-Reply-To: <Pine.LNX.4.33.0107081102410.7044-100000@penguin.transmeta.com> <Pine.LNX.4.33.0107081918350.9756-100000@alloc.wat.veritas.com>
In-Reply-To: <Pine.LNX.4.33.0107081918350.9756-100000@alloc.wat.veritas.com>; from markhe@veritas.com on Sun, Jul 08, 2001 at 07:26:01PM +0100

On Sun, Jul 08, 2001 at 07:26:01PM +0100, Mark Hemment wrote:
> On Sun, 8 Jul 2001, Linus Torvalds wrote:
> > On Sun, 8 Jul 2001 markhe@veritas.com wrote:
> > >
> > >   mm/highmem.c/copy_from_high_bh() blocks interrupts while copying "down"
> > > to a bounce buffer, for writing.
> > >   This function is only ever called from create_bounce() (which cannot
> > > be called from an interrupt context - it may block), and the kmap
> > > 'KM_BOUNCE_WRITE' is only used in copy_from_high_bh().
> >
> > If so it's not just the interrupt disable that is unnecessary, the
> > "kmap_atomic()" should also be just a plain "kmap()", I think.
> 
>   That might eat through kmap()'s virtual window too quickly.

certainly not more quickly than a flood of allocation of highmem pages
in anon mem. I don't see your point. kmap has to work just fine over
there and the __cli/__sti was obviously useless. (should be faster
because we won't need to invlpg at every bounce, but OTOH we'll flush
the whole tlb after the wrap around but as said above if flushing the
tlb too frequently is the issue we should simply improve kmap because
the flood of kmap will happen anyways in the very fast paths regardless
of the bounces)

>   I did think about adding a test to see if the page was already mapped,
> and falling back to kmap_atomic() if it isn't.  That should give the best
> of both worlds?
> 
> Mark


Andrea

  reply	other threads:[~2001-07-08 23:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.33.0107081102410.7044-100000@penguin.transmeta.com>
2001-07-08 18:26 ` [PATCH] copy_from_high_bh Mark Hemment
2001-07-08 23:33   ` Andrea Arcangeli [this message]
2001-07-08 15:04 markhe

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=20010709013319.C20908@athlon.random \
    --to=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markhe@veritas.com \
    --cc=mingo@chiara.elte.hu \
    --cc=torvalds@transmeta.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