Well I certainly wasn't we have an additional virtual mapping for all
of physical RAM - if nothing else that would waste a bunch of space in
page tables. I was thinking of a pool of VM out of which to establish
new consistent mappings - with a simple and irq-safe allocated working
within the pre-allocated chunk of VM.
Which of course raises the hard question: how big should the pool be?
It would be possible to have something running in user context which
tops up the pool if it is low, but that starts getting complex, and
wouldn't help a driver which wants to allocate a large chunk of
consistent memory from interrupt context.
> The current situation on ARM works for 95% of cases. If the choice is
> between "95% working" and "cutting off the hand that feeds you" I'd
> prefer the former.
>
> On a more constructive note, I believe there is a way around the
> mm->page_table_lock problem. I believe we should completely split the
> handling of the user space page tables from the kernel space page tables.
>
> User space can carry on using mm->page_table_lock and be happy; it should
> never ever touch the kernel page tables.
>
> We then only have to worry about making things that touch the kernel page
> tables irq-safe. How many of those are there? Two. ioremap and vmalloc.
> Neither of these two functions has any business touching anything other
> than pid0's tables, and certainly has no business touching user space
> page tables. The problem is now far easier to deal with.
Well, that sounds like it would work. On the other hand, it seems
like a non-trivial set of modifications to the VM structure.
> remap_page_range() shouldn't be a problem - its supposed to map pages
> into user space, and if you're calling that from IRQ context, you're
> doing something really wrong.
>
> If I can get out of my current circle of never-ending problems and paid-
> for work on other areas of ARM stuff, I might be able to look at this.
> I've currently got an estimated backlog of one whole week on anything I
> do atm.
-- David Gibson | For every complex problem there is a david@gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/