lkml.org 
[lkml]   [2014]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 11/12] x86, mpx: cleanup unused bound tables
On Thu, 6 Nov 2014, Dave Hansen wrote:
> Instead of all of these games with dropping and reacquiring mmap_sem and
> adding other locks, or deferring the work, why don't we just do a
> get_user_pages()? Something along the lines of:
>
> while (1) {
> ret = cmpxchg(addr)
> if (!ret)
> break;
> if (ret == -EFAULT)
> get_user_pages(addr);
> }
>
> Does anybody see a problem with that?

You want to do that under mmap_sem write held, right? Not a problem per
se, except that you block normal faults for a possibly long time when
the page(s) need to be swapped in.

But yes, this might solve most of the issues at hand. Did not think
about GUP at all :(

Thanks,

tglx



\
 
 \ /
  Last update: 2014-11-11 20:01    [W:0.459 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site