lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [FYI] tux3: Core changes
On Wed, 20 May 2015, Daniel Phillips wrote:

> On 05/20/2015 07:44 AM, Jan Kara wrote:
>> Yeah, that's what I meant. If you create a function which manipulates
>> page cache, you better make it work with other functions manipulating page
>> cache. Otherwise it's a landmine waiting to be tripped by some unsuspecting
>> developer. Sure you can document all the conditions under which the
>> function is safe to use but a function that has several paragraphs in front
>> of it explaning when it is safe to use isn't very good API...
>
> Violent agreement, of course. To put it in concrete terms, each of
> the page fork support functions must be examined and determined
> sane. They are:
>
> * cow_replace_page_cache
> * cow_delete_from_page_cache
> * cow_clone_page
> * page_cow_one
> * page_cow_file
>
> Would it be useful to drill down into those, starting from the top
> of the list?

It's a little more than determining that these 5 functions are sane, it's making
sure that if someone mixes the use of these functions with other existing
functions that the result is sane.

but it's probably a good starting point to look at each of these five functions
in detail and consider how they work and could interact badly with other things
touching the page cache.

David Lang


\
 
 \ /
  Last update: 2015-05-20 20:21    [W:0.157 / U:2.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site