Re: [patch 12/13] GRU Driver V3 - export is_uv_system(), zap_page_range() & follow_page()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Hugh Dickins
Date: Monday, July 7, 2008 - 9:29 am

On Mon, 7 Jul 2008, Jack Steiner wrote:

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.

...


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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 12/13] GRU Driver V3 - export is_uv_system(), ..., Christoph Hellwig, (Fri Jul 4, 12:39 am)
Re: [patch 12/13] GRU Driver V3 - export is_uv_system(), ..., Christoph Lameter, (Mon Jul 7, 7:45 am)
Re: [patch 12/13] GRU Driver V3 - export is_uv_system(), ..., Andrea Arcangeli, (Mon Jul 7, 7:54 am)
Re: [patch 12/13] GRU Driver V3 - export is_uv_system(), ..., Hugh Dickins, (Mon Jul 7, 9:29 am)
Re: [patch 12/13] GRU Driver V3 - export is_uv_system(), ..., Arjan van de Ven, (Mon Jul 7, 11:58 am)
Re: [patch 12/13] GRU Driver V3 - export is_uv_system(), ..., Andrea Arcangeli, (Mon Jul 7, 2:03 pm)