lkml.org 
[lkml]   [2011]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] fadvise: move active pages to inactive list with POSIX_FADV_DONTNEED
(2011/06/27 18:17), Pádraig Brady wrote:
> On 27/06/11 06:38, KOSAKI Motohiro wrote:
>>> Hmm, What if you do want to evict it from the cache for testing purposes?
>>> Perhaps this functionality should be associated with POSIX_FADV_NOREUSE?
>>> dd has been recently modified to support invalidating the cache for a file,
>>> and it uses POSIX_FADV_DONTNEED for that.
>>> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=5f311553
>>
>> This change don't break dd. dd don't have a special privilege of file cache
>> dropping if it's also used by other processes.
>>
>> if you want to drop a cache forcely (maybe for testing), you need to use
>> /proc/sys/vm/drop_caches. It's ok to ignore other processes activity because
>> it's privilege operation.
>
> Well the function and privileges are separate things.
> I think we've agreed that the new functionality is
> best associated with POSIX_FADV_NOREUSE,
> and the existing functionality with POSIX_FADV_DONTNEED.
>
> BTW, I don't think privileges are currently enforced
> as I got root to cache a file here with:
> # (time md5sum; sleep 100) < big.file
> And a normal user was able to uncache with:
> $ dd iflag=nocache if=big.file count=0
> Anyway as said, this is a separate "issue".

I'm failed to see your point. Why does dd need to ignore other
process activity? If no other process, this patch doesn't change
any behavior. Isn't it?


--
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/

\
 
 \ /
  Last update: 2011-06-27 12:03    [W:0.039 / U:1.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site