- 追加された行はこの色です。
- 削除された行はこの色です。
*参照元 [#h74e201f]
#backlinks
*説明 [#f9f927b7]
-パス: [[linux-2.6.33/mm/readahead.c]]
-FIXME: これは何?
--説明
**引数 [#u032cdd4]
-struct address_space *mapping
--[[linux-2.6.33/address_space]]
-struct file_ra_state *ra
--[[linux-2.6.33/file_ra_state]]
-struct file *filp
--[[linux-2.6.33/file]]
-struct page *page
--[[linux-2.6.33/page]]
-pgoff_t offset
--
-unsigned long req_size
--
**返り値 [#m063ce4c]
-なし
**参考 [#q03b54cb]
*実装 [#we862e32]
/**
* page_cache_async_readahead - file readahead for marked pages
* @mapping: address_space which holds the pagecache and I/O vectors
* @ra: file_ra_state which holds the readahead state
* @filp: passed on to ->readpage() and ->readpages()
* @page: the page at @offset which has the PG_readahead flag set
* @offset: start offset into @mapping, in pagecache page-sized units
* @req_size: hint: total size of the read which the caller is performing in
* pagecache pages
*
* page_cache_async_ondemand() should be called when a page is used which
* has the PG_readahead flag; this is a marker to suggest that the application
* has used up enough of the readahead window that we should start pulling in
* more pages.
*/
void
page_cache_async_readahead(struct address_space *mapping,
struct file_ra_state *ra, struct file *filp,
struct page *page, pgoff_t offset,
unsigned long req_size)
{
/* no read-ahead */
if (!ra->ra_pages)
return;
/*
* Same bit is used for PG_readahead and PG_reclaim.
*/
if (PageWriteback(page))
return;
ClearPageReadahead(page);
/*
* Defer asynchronous read-ahead on IO congestion.
*/
if (bdi_read_congested(mapping->backing_dev_info))
return;
/* do read-ahead */
ondemand_readahead(mapping, ra, filp, true, offset, req_size);
#ifdef CONFIG_BLOCK
/*
* Normally the current page is !uptodate and lock_page() will be
* immediately called to implicitly unplug the device. However this
* is not always true for RAID conifgurations, where data arrives
* not strictly in their submission order. In this case we need to
* explicitly kick off the IO.
*/
if (PageUptodate(page))
blk_run_backing_dev(mapping->backing_dev_info, NULL);
#endif
}
EXPORT_SYMBOL_GPL(page_cache_async_readahead);
--カーネルのシンボルテーブル(GPL 用)にエクスポートする。
--[[linux-2.6.33/EXPORT_SYMBOL_GPL()]]
*コメント [#id9dd849]