From: Hugh Dickins <hugh@veritas.com>
To: Jack Steiner <steiner@sgi.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Nick Piggin <nickpiggin@yahoo.com.au>,
cl@linux-foundation.org, akpm@osdl.org,
linux-kernel@vger.kernel.org, mingo@elte.hu, tglx@linutronix.de,
holt@sgi.com, andrea@qumranet.com, linux-mm@kvack.org
Subject: Re: [patch 12/13] GRU Driver V3 - export is_uv_system(), zap_page_range() & follow_page()
Date: Mon, 7 Jul 2008 17:29:54 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0807071657450.17825@blonde.site> (raw)
In-Reply-To: <20080707143916.GA5209@sgi.com>
On Mon, 7 Jul 2008, Jack Steiner wrote:
> > > +EXPORT_SYMBOL_GPL(follow_page);
> >
> > NACK.
> >
> > These should never be called by a driver and suggest you need to rething
> > your VM integration in this driver.
>
> Can you provide some additional details on the type of kernel API
> that could be exported to provide a pte lookup in atomic context?
I don't see EXPORT_SYMBOL_GPL(follow_page) as objectionable myself:
it rather seems rather to complement EXPORT_SYMBOL(vm_insert_page)
and EXPORT_SYMBOL(vmalloc_to_page); though I'd agree that it's
sufficiently sensitive to need that _GPL on it.
...
> Currently, the driver calls follow_page() in interrupt context.
However, that's a problem, isn't it, given the pte_offset_map_lock
in follow_page? To avoid the possibility of deadlock, wouldn't we
have to change all the page table locking to irq-disabling variants?
Which I think we'd have reason to prefer not to do.
Maybe study the assumptions Nick is making in his arch/x86/mm/gup.c
in mm, and do something similar in your GRU driver (falling back to
the slow method when anything's not quite right). It's not nice to
have such code out in a driver, but GRU is going to be exceptional,
and it may be better to have it out there than pretence of generality
in the core mm exporting it.
Note that even the unlocked pte_offset_map which gup_pte_range uses,
is in general unsafe at interrupt time: because of using a KM_PTE0
atomic kmap which might be in use at the time of the interrupt. But
I doubt your GRU driver is intended for use in HIGHMEM architectures,
so that may be enough to excuse it.
Hugh
next prev parent reply other threads:[~2008-07-07 16:30 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 21:33 [patch 00/13] GRU Driver V3 - Overview steiner
2008-07-03 21:33 ` [patch 01/13] GRU Driver V3 - hardware data structures steiner
2008-07-03 21:33 ` [patch 02/13] GRU Driver V3 - GRU instructions & macros steiner
2008-07-03 21:33 ` [patch 03/13] GRU Driver V3 - driver internal header files steiner
2008-07-03 21:33 ` [patch 04/13] GRU Driver V3 - kernel services " steiner
2008-07-03 21:33 ` [patch 05/13] GRU Driver V3 - driver initialization, file & vma ops steiner
2008-07-03 21:33 ` [patch 06/13] GRU Driver V3 - page faults & exceptions steiner
2008-07-03 21:33 ` [patch 07/13] GRU Driver V3 - kernel services provide by driver steiner
2008-07-03 21:33 ` [patch 08/13] GRU Driver V3 - resource management steiner
2008-07-03 21:33 ` [patch 09/13] GRU Driver V3 - /proc interfaces steiner
2008-07-03 21:33 ` [patch 10/13] GRU Driver V3 - TLB flushing, MMUOPS callouts steiner
2008-07-03 21:33 ` [patch 11/13] GRU Driver V3 - driver makefile steiner
2008-07-03 21:34 ` [patch 12/13] GRU Driver V3 - export is_uv_system(), zap_page_range() & follow_page() steiner
2008-07-04 7:39 ` Christoph Hellwig
2008-07-07 14:39 ` Jack Steiner
2008-07-07 14:54 ` Andrea Arcangeli
2008-07-07 16:29 ` Hugh Dickins [this message]
2008-07-07 16:53 ` Jack Steiner
2008-07-08 2:16 ` Nick Piggin
2008-07-09 19:11 ` Jack Steiner
2008-07-10 7:31 ` Nick Piggin
2008-07-10 13:29 ` Jack Steiner
2008-07-10 14:21 ` Nick Piggin
2008-07-10 16:33 ` Jack Steiner
2008-07-10 16:52 ` Nick Piggin
2008-07-10 17:20 ` Jack Steiner
2008-07-11 3:30 ` Nick Piggin
2008-07-07 18:58 ` Arjan van de Ven
2008-07-07 19:29 ` Jack Steiner
2008-07-07 21:03 ` Andrea Arcangeli
2008-07-07 14:45 ` Christoph Lameter
2008-07-07 17:58 ` Jack Steiner
2008-07-03 21:34 ` [patch 13/13] GRU Driver V3 - driver/misc Makefile & Kconfig changes steiner
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.64.0807071657450.17825@blonde.site \
--to=hugh@veritas.com \
--cc=akpm@osdl.org \
--cc=andrea@qumranet.com \
--cc=cl@linux-foundation.org \
--cc=hch@infradead.org \
--cc=holt@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
/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®