lkml.org 
[lkml]   [2009]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 22/43] CacheFiles: Add a hook to write a single page of data to an inode [ver #46]
Date
David Howells <dhowells@redhat.com> wrote:

> + data = kmap(page);
> + old_fs = get_fs();
> + set_fs(KERNEL_DS);
> + ret = file->f_op->write(
> + file, (const void __user *) data, PAGE_SIZE,
> + &pos);
> + set_fs(old_fs);
> + kunmap(page);

Hmmm... Now I've thought about it some more, I'm not sure this is a good
idea. Can this run a system out of kmap() resources? These are run by a
dynamic thread pool, where each thread in the pool can do a kmap and issue a
write, but the write may get delayed for a significant amount of time for a
number of reasons - such as block allocation, data fetching and memory
allocation.

David


\
 
 \ /
  Last update: 2009-04-03 15:45    [W:0.981 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site