lkml.org 
[lkml]   [2012]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] uprobes/core: Remove redundant lock_page/unlock_page
* Peter Zijlstra <peterz@infradead.org> [2012-05-31 13:58:38]:

> On Thu, 2012-05-31 at 17:16 +0530, Srikar Dronamraju wrote:
> > From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> >
> > No need to lock the page when copying the opcode in read_opcode().
>
> It would be good if the changelog said _why_ this is so :-)

In read_opcode(), we have the reference for the page and we only are reading
from the the page. i.e we are neither modifying the page contents, not
the page attributes.

Existing kernel code has enough examples where we read the contents
of the page without taking the page lock.

Further this was discussed here too https://lkml.org/lkml/2012/4/17/361.

--
Thanks and Regards
Srikar



\
 
 \ /
  Last update: 2012-05-31 18:01    [W:0.199 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site