lkml.org 
[lkml]   [2008]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PTE access rules & abstraction
Benjamin Herrenschmidt wrote:
> On Thu, 2008-09-25 at 11:15 -0700, Jeremy Fitzhardinge wrote:
>
>> The ptep_modify_prot_start/commit pair specifies a single pte update in
>> such a way to allow more implementation flexibility - ie, there's no
>> naked requirement for an atomic fetch-and-clear operation. I chose the
>> transaction-like terminology to emphasize that the start/commit
>> functions must be strictly paired; there's no way to fail or abort the
>> "transaction". A whole group of those start/commit pairs can be batched
>> together without affecting their semantics.
>>
>
> I still can't see the point of having now 3 functions instead of just
> one such as ptep_modify_protection(). I don't see what it buys you other
> than adding gratuituous new interfaces.
>

Yeah, that would work too; that's pretty much how Xen implements it
anyway. The main advantage of the start/commit pair is that the
resulting code was completely unchanged from the old code. The mprotect
sequence using ptep_modify_protection would end up reading the pte twice
before writing it.

J


\
 
 \ /
  Last update: 2008-09-26 00:31    [W:0.155 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site