<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/fscache-cache.h, branch v3.10.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>FS-Cache: Mark cancellation of in-progress operation</title>
<updated>2012-12-20T22:34:00+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-12-13T20:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1f372dff1da37e2b36ae9085368fa46896398598'/>
<id>1f372dff1da37e2b36ae9085368fa46896398598</id>
<content type='text'>
Mark as cancelled an operation that is in progress rather than pending at the
time it is cancelled, and call fscache_complete_op() to cancel an operation so
that blocked ops can be started.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mark as cancelled an operation that is in progress rather than pending at the
time it is cancelled, and call fscache_complete_op() to cancel an operation so
that blocked ops can be started.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FS-Cache: Convert the object event ID #defines into an enum</title>
<updated>2012-12-20T22:08:05+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-12-05T13:34:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=36a02de5d7981435931d4608ee3e510b752e072b'/>
<id>36a02de5d7981435931d4608ee3e510b752e072b</id>
<content type='text'>
Convert the fscache_object event IDs from #defines into an enum.  Also add an
extra label to the enum to carry the event count and redefine the event mask
in terms of that.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert the fscache_object event IDs from #defines into an enum.  Also add an
extra label to the enum to carry the event count and redefine the event mask
in terms of that.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FS-Cache: Provide proper invalidation</title>
<updated>2012-12-20T22:04:07+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-12-20T21:52:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ef778e7ae67cd426c30cad43378b908f5eb0bad5'/>
<id>ef778e7ae67cd426c30cad43378b908f5eb0bad5</id>
<content type='text'>
Provide a proper invalidation method rather than relying on the netfs retiring
the cookie it has and getting a new one.  The problem with this is that isn't
easy for the netfs to make sure that it has completed/cancelled all its
outstanding storage and retrieval operations on the cookie it is retiring.

Instead, have the cache provide an invalidation method that will cancel or wait
for all currently outstanding operations before invalidating the cache, and
will cause new operations to queue up behind that.  Whilst invalidation is in
progress, some requests will be rejected until the cache can stack a barrier on
the operation queue to cause new operations to be deferred behind it.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a proper invalidation method rather than relying on the netfs retiring
the cookie it has and getting a new one.  The problem with this is that isn't
easy for the netfs to make sure that it has completed/cancelled all its
outstanding storage and retrieval operations on the cookie it is retiring.

Instead, have the cache provide an invalidation method that will cancel or wait
for all currently outstanding operations before invalidating the cache, and
will cause new operations to queue up behind that.  Whilst invalidation is in
progress, some requests will be rejected until the cache can stack a barrier on
the operation queue to cause new operations to be deferred behind it.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FS-Cache: Fix operation state management and accounting</title>
<updated>2012-12-20T21:58:26+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-12-20T21:52:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9f10523f891928330b7529da54c1a3cc65180b1a'/>
<id>9f10523f891928330b7529da54c1a3cc65180b1a</id>
<content type='text'>
Fix the state management of internal fscache operations and the accounting of
what operations are in what states.

This is done by:

 (1) Give struct fscache_operation a enum variable that directly represents the
     state it's currently in, rather than spreading this knowledge over a bunch
     of flags, who's processing the operation at the moment and whether it is
     queued or not.

     This makes it easier to write assertions to check the state at various
     points and to prevent invalid state transitions.

 (2) Add an 'operation complete' state and supply a function to indicate the
     completion of an operation (fscache_op_complete()) and make things call
     it.  The final call to fscache_put_operation() can then check that an op
     in the appropriate state (complete or cancelled).

 (3) Adjust the use of object-&gt;n_ops, -&gt;n_in_progress, -&gt;n_exclusive to better
     govern the state of an object:

	(a) The -&gt;n_ops is now the number of extant operations on the object
	    and is now decremented by fscache_put_operation() only.

	(b) The -&gt;n_in_progress is simply the number of objects that have been
	    taken off of the object's pending queue for the purposes of being
	    run.  This is decremented by fscache_op_complete() only.

	(c) The -&gt;n_exclusive is the number of exclusive ops that have been
	    submitted and queued or are in progress.  It is decremented by
	    fscache_op_complete() and by fscache_cancel_op().

     fscache_put_operation() and fscache_operation_gc() now no longer try to
     clean up -&gt;n_exclusive and -&gt;n_in_progress.  That was leading to double
     decrements against fscache_cancel_op().

     fscache_cancel_op() now no longer decrements -&gt;n_ops.  That was leading to
     double decrements against fscache_put_operation().

     fscache_submit_exclusive_op() now decides whether it has to queue an op
     based on -&gt;n_in_progress being &gt; 0 rather than -&gt;n_ops &gt; 0 as the latter
     will persist in being true even after all preceding operations have been
     cancelled or completed.  Furthermore, if an object is active and there are
     runnable ops against it, there must be at least one op running.

 (4) Add a remaining-pages counter (n_pages) to struct fscache_retrieval and
     provide a function to record completion of the pages as they complete.

     When n_pages reaches 0, the operation is deemed to be complete and
     fscache_op_complete() is called.

     Add calls to fscache_retrieval_complete() anywhere we've finished with a
     page we've been given to read or allocate for.  This includes places where
     we just return pages to the netfs for reading from the server and where
     accessing the cache fails and we discard the proposed netfs page.

The bugs in the unfixed state management manifest themselves as oopses like the
following where the operation completion gets out of sync with return of the
cookie by the netfs.  This is possible because the cache unlocks and returns
all the netfs pages before recording its completion - which means that there's
nothing to stop the netfs discarding them and returning the cookie.


FS-Cache: Cookie 'NFS.fh' still has outstanding reads
------------[ cut here ]------------
kernel BUG at fs/fscache/cookie.c:519!
invalid opcode: 0000 [#1] SMP
CPU 1
Modules linked in: cachefiles nfs fscache auth_rpcgss nfs_acl lockd sunrpc

Pid: 400, comm: kswapd0 Not tainted 3.1.0-rc7-fsdevel+ #1090                  /DG965RY
RIP: 0010:[&lt;ffffffffa007050a&gt;]  [&lt;ffffffffa007050a&gt;] __fscache_relinquish_cookie+0x170/0x343 [fscache]
RSP: 0018:ffff8800368cfb00  EFLAGS: 00010282
RAX: 000000000000003c RBX: ffff880023cc8790 RCX: 0000000000000000
RDX: 0000000000002f2e RSI: 0000000000000001 RDI: ffffffff813ab86c
RBP: ffff8800368cfb50 R08: 0000000000000002 R09: 0000000000000000
R10: ffff88003a1b7890 R11: ffff88001df6e488 R12: ffff880023d8ed98
R13: ffff880023cc8798 R14: 0000000000000004 R15: ffff88003b8bf370
FS:  0000000000000000(0000) GS:ffff88003bd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00000000008ba008 CR3: 0000000023d93000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kswapd0 (pid: 400, threadinfo ffff8800368ce000, task ffff88003b8bf040)
Stack:
 ffff88003b8bf040 ffff88001df6e528 ffff88001df6e528 ffffffffa00b46b0
 ffff88003b8bf040 ffff88001df6e488 ffff88001df6e620 ffffffffa00b46b0
 ffff88001ebd04c8 0000000000000004 ffff8800368cfb70 ffffffffa00b2c91
Call Trace:
 [&lt;ffffffffa00b2c91&gt;] nfs_fscache_release_inode_cookie+0x3b/0x47 [nfs]
 [&lt;ffffffffa008f25f&gt;] nfs_clear_inode+0x3c/0x41 [nfs]
 [&lt;ffffffffa0090df1&gt;] nfs4_evict_inode+0x2f/0x33 [nfs]
 [&lt;ffffffff810d8d47&gt;] evict+0xa1/0x15c
 [&lt;ffffffff810d8e2e&gt;] dispose_list+0x2c/0x38
 [&lt;ffffffff810d9ebd&gt;] prune_icache_sb+0x28c/0x29b
 [&lt;ffffffff810c56b7&gt;] prune_super+0xd5/0x140
 [&lt;ffffffff8109b615&gt;] shrink_slab+0x102/0x1ab
 [&lt;ffffffff8109d690&gt;] balance_pgdat+0x2f2/0x595
 [&lt;ffffffff8103e009&gt;] ? process_timeout+0xb/0xb
 [&lt;ffffffff8109dba3&gt;] kswapd+0x270/0x289
 [&lt;ffffffff8104c5ea&gt;] ? __init_waitqueue_head+0x46/0x46
 [&lt;ffffffff8109d933&gt;] ? balance_pgdat+0x595/0x595
 [&lt;ffffffff8104bf7a&gt;] kthread+0x7f/0x87
 [&lt;ffffffff813ad6b4&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff81026b98&gt;] ? finish_task_switch+0x45/0xc0
 [&lt;ffffffff813abcdd&gt;] ? retint_restore_args+0xe/0xe
 [&lt;ffffffff8104befb&gt;] ? __init_kthread_worker+0x53/0x53
 [&lt;ffffffff813ad6b0&gt;] ? gs_change+0xb/0xb

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the state management of internal fscache operations and the accounting of
what operations are in what states.

This is done by:

 (1) Give struct fscache_operation a enum variable that directly represents the
     state it's currently in, rather than spreading this knowledge over a bunch
     of flags, who's processing the operation at the moment and whether it is
     queued or not.

     This makes it easier to write assertions to check the state at various
     points and to prevent invalid state transitions.

 (2) Add an 'operation complete' state and supply a function to indicate the
     completion of an operation (fscache_op_complete()) and make things call
     it.  The final call to fscache_put_operation() can then check that an op
     in the appropriate state (complete or cancelled).

 (3) Adjust the use of object-&gt;n_ops, -&gt;n_in_progress, -&gt;n_exclusive to better
     govern the state of an object:

	(a) The -&gt;n_ops is now the number of extant operations on the object
	    and is now decremented by fscache_put_operation() only.

	(b) The -&gt;n_in_progress is simply the number of objects that have been
	    taken off of the object's pending queue for the purposes of being
	    run.  This is decremented by fscache_op_complete() only.

	(c) The -&gt;n_exclusive is the number of exclusive ops that have been
	    submitted and queued or are in progress.  It is decremented by
	    fscache_op_complete() and by fscache_cancel_op().

     fscache_put_operation() and fscache_operation_gc() now no longer try to
     clean up -&gt;n_exclusive and -&gt;n_in_progress.  That was leading to double
     decrements against fscache_cancel_op().

     fscache_cancel_op() now no longer decrements -&gt;n_ops.  That was leading to
     double decrements against fscache_put_operation().

     fscache_submit_exclusive_op() now decides whether it has to queue an op
     based on -&gt;n_in_progress being &gt; 0 rather than -&gt;n_ops &gt; 0 as the latter
     will persist in being true even after all preceding operations have been
     cancelled or completed.  Furthermore, if an object is active and there are
     runnable ops against it, there must be at least one op running.

 (4) Add a remaining-pages counter (n_pages) to struct fscache_retrieval and
     provide a function to record completion of the pages as they complete.

     When n_pages reaches 0, the operation is deemed to be complete and
     fscache_op_complete() is called.

     Add calls to fscache_retrieval_complete() anywhere we've finished with a
     page we've been given to read or allocate for.  This includes places where
     we just return pages to the netfs for reading from the server and where
     accessing the cache fails and we discard the proposed netfs page.

The bugs in the unfixed state management manifest themselves as oopses like the
following where the operation completion gets out of sync with return of the
cookie by the netfs.  This is possible because the cache unlocks and returns
all the netfs pages before recording its completion - which means that there's
nothing to stop the netfs discarding them and returning the cookie.


FS-Cache: Cookie 'NFS.fh' still has outstanding reads
------------[ cut here ]------------
kernel BUG at fs/fscache/cookie.c:519!
invalid opcode: 0000 [#1] SMP
CPU 1
Modules linked in: cachefiles nfs fscache auth_rpcgss nfs_acl lockd sunrpc

Pid: 400, comm: kswapd0 Not tainted 3.1.0-rc7-fsdevel+ #1090                  /DG965RY
RIP: 0010:[&lt;ffffffffa007050a&gt;]  [&lt;ffffffffa007050a&gt;] __fscache_relinquish_cookie+0x170/0x343 [fscache]
RSP: 0018:ffff8800368cfb00  EFLAGS: 00010282
RAX: 000000000000003c RBX: ffff880023cc8790 RCX: 0000000000000000
RDX: 0000000000002f2e RSI: 0000000000000001 RDI: ffffffff813ab86c
RBP: ffff8800368cfb50 R08: 0000000000000002 R09: 0000000000000000
R10: ffff88003a1b7890 R11: ffff88001df6e488 R12: ffff880023d8ed98
R13: ffff880023cc8798 R14: 0000000000000004 R15: ffff88003b8bf370
FS:  0000000000000000(0000) GS:ffff88003bd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00000000008ba008 CR3: 0000000023d93000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kswapd0 (pid: 400, threadinfo ffff8800368ce000, task ffff88003b8bf040)
Stack:
 ffff88003b8bf040 ffff88001df6e528 ffff88001df6e528 ffffffffa00b46b0
 ffff88003b8bf040 ffff88001df6e488 ffff88001df6e620 ffffffffa00b46b0
 ffff88001ebd04c8 0000000000000004 ffff8800368cfb70 ffffffffa00b2c91
Call Trace:
 [&lt;ffffffffa00b2c91&gt;] nfs_fscache_release_inode_cookie+0x3b/0x47 [nfs]
 [&lt;ffffffffa008f25f&gt;] nfs_clear_inode+0x3c/0x41 [nfs]
 [&lt;ffffffffa0090df1&gt;] nfs4_evict_inode+0x2f/0x33 [nfs]
 [&lt;ffffffff810d8d47&gt;] evict+0xa1/0x15c
 [&lt;ffffffff810d8e2e&gt;] dispose_list+0x2c/0x38
 [&lt;ffffffff810d9ebd&gt;] prune_icache_sb+0x28c/0x29b
 [&lt;ffffffff810c56b7&gt;] prune_super+0xd5/0x140
 [&lt;ffffffff8109b615&gt;] shrink_slab+0x102/0x1ab
 [&lt;ffffffff8109d690&gt;] balance_pgdat+0x2f2/0x595
 [&lt;ffffffff8103e009&gt;] ? process_timeout+0xb/0xb
 [&lt;ffffffff8109dba3&gt;] kswapd+0x270/0x289
 [&lt;ffffffff8104c5ea&gt;] ? __init_waitqueue_head+0x46/0x46
 [&lt;ffffffff8109d933&gt;] ? balance_pgdat+0x595/0x595
 [&lt;ffffffff8104bf7a&gt;] kthread+0x7f/0x87
 [&lt;ffffffff813ad6b4&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff81026b98&gt;] ? finish_task_switch+0x45/0xc0
 [&lt;ffffffff813abcdd&gt;] ? retint_restore_args+0xe/0xe
 [&lt;ffffffff8104befb&gt;] ? __init_kthread_worker+0x53/0x53
 [&lt;ffffffff813ad6b0&gt;] ? gs_change+0xb/0xb

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FS-Cache: Make cookie relinquishment wait for outstanding reads</title>
<updated>2012-12-20T21:58:25+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-12-20T21:52:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ef46ed888efb1e8da33be5d33c9b54476289a43b'/>
<id>ef46ed888efb1e8da33be5d33c9b54476289a43b</id>
<content type='text'>
Make fscache_relinquish_cookie() log a warning and wait if there are any
outstanding reads left on the cookie it was given.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make fscache_relinquish_cookie() log a warning and wait if there are any
outstanding reads left on the cookie it was given.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CacheFiles: Fix the marking of cached pages</title>
<updated>2012-12-20T21:54:30+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-12-20T21:52:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c4d6d8dbf335c7fa47341654a37c53a512b519bb'/>
<id>c4d6d8dbf335c7fa47341654a37c53a512b519bb</id>
<content type='text'>
Under some circumstances CacheFiles defers the marking of pages with PG_fscache
so that it can take advantage of pagevecs to reduce the number of calls to
fscache_mark_pages_cached() and the netfs's hook to keep track of this.

There are, however, two problems with this:

 (1) It can lead to the PG_fscache mark being applied _after_ the page is set
     PG_uptodate and unlocked (by the call to fscache_end_io()).

 (2) CacheFiles's ref on the page is dropped immediately following
     fscache_end_io() - and so may not still be held when the mark is applied.
     This can lead to the page being passed back to the allocator before the
     mark is applied.

Fix this by, where appropriate, marking the page before calling
fscache_end_io() and releasing the page.  This means that we can't take
advantage of pagevecs and have to make a separate call for each page to the
marking routines.

The symptoms of this are Bad Page state errors cropping up under memory
pressure, for example:

BUG: Bad page state in process tar  pfn:002da
page:ffffea0000009fb0 count:0 mapcount:0 mapping:          (null) index:0x1447
page flags: 0x1000(private_2)
Pid: 4574, comm: tar Tainted: G        W   3.1.0-rc4-fsdevel+ #1064
Call Trace:
 [&lt;ffffffff8109583c&gt;] ? dump_page+0xb9/0xbe
 [&lt;ffffffff81095916&gt;] bad_page+0xd5/0xea
 [&lt;ffffffff81095d82&gt;] get_page_from_freelist+0x35b/0x46a
 [&lt;ffffffff810961f3&gt;] __alloc_pages_nodemask+0x362/0x662
 [&lt;ffffffff810989da&gt;] __do_page_cache_readahead+0x13a/0x267
 [&lt;ffffffff81098942&gt;] ? __do_page_cache_readahead+0xa2/0x267
 [&lt;ffffffff81098d7b&gt;] ra_submit+0x1c/0x20
 [&lt;ffffffff8109900a&gt;] ondemand_readahead+0x28b/0x29a
 [&lt;ffffffff81098ee2&gt;] ? ondemand_readahead+0x163/0x29a
 [&lt;ffffffff810990ce&gt;] page_cache_sync_readahead+0x38/0x3a
 [&lt;ffffffff81091d8a&gt;] generic_file_aio_read+0x2ab/0x67e
 [&lt;ffffffffa008cfbe&gt;] nfs_file_read+0xa4/0xc9 [nfs]
 [&lt;ffffffff810c22c4&gt;] do_sync_read+0xba/0xfa
 [&lt;ffffffff81177a47&gt;] ? security_file_permission+0x7b/0x84
 [&lt;ffffffff810c25dd&gt;] ? rw_verify_area+0xab/0xc8
 [&lt;ffffffff810c29a4&gt;] vfs_read+0xaa/0x13a
 [&lt;ffffffff810c2a79&gt;] sys_read+0x45/0x6c
 [&lt;ffffffff813ac37b&gt;] system_call_fastpath+0x16/0x1b

As can be seen, PG_private_2 (== PG_fscache) is set in the page flags.

Instrumenting fscache_mark_pages_cached() to verify whether page-&gt;mapping was
set appropriately showed that sometimes it wasn't.  This led to the discovery
that sometimes the page has apparently been reclaimed by the time the marker
got to see it.

Reported-by: M. Stevens &lt;m@tippett.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Under some circumstances CacheFiles defers the marking of pages with PG_fscache
so that it can take advantage of pagevecs to reduce the number of calls to
fscache_mark_pages_cached() and the netfs's hook to keep track of this.

There are, however, two problems with this:

 (1) It can lead to the PG_fscache mark being applied _after_ the page is set
     PG_uptodate and unlocked (by the call to fscache_end_io()).

 (2) CacheFiles's ref on the page is dropped immediately following
     fscache_end_io() - and so may not still be held when the mark is applied.
     This can lead to the page being passed back to the allocator before the
     mark is applied.

Fix this by, where appropriate, marking the page before calling
fscache_end_io() and releasing the page.  This means that we can't take
advantage of pagevecs and have to make a separate call for each page to the
marking routines.

The symptoms of this are Bad Page state errors cropping up under memory
pressure, for example:

BUG: Bad page state in process tar  pfn:002da
page:ffffea0000009fb0 count:0 mapcount:0 mapping:          (null) index:0x1447
page flags: 0x1000(private_2)
Pid: 4574, comm: tar Tainted: G        W   3.1.0-rc4-fsdevel+ #1064
Call Trace:
 [&lt;ffffffff8109583c&gt;] ? dump_page+0xb9/0xbe
 [&lt;ffffffff81095916&gt;] bad_page+0xd5/0xea
 [&lt;ffffffff81095d82&gt;] get_page_from_freelist+0x35b/0x46a
 [&lt;ffffffff810961f3&gt;] __alloc_pages_nodemask+0x362/0x662
 [&lt;ffffffff810989da&gt;] __do_page_cache_readahead+0x13a/0x267
 [&lt;ffffffff81098942&gt;] ? __do_page_cache_readahead+0xa2/0x267
 [&lt;ffffffff81098d7b&gt;] ra_submit+0x1c/0x20
 [&lt;ffffffff8109900a&gt;] ondemand_readahead+0x28b/0x29a
 [&lt;ffffffff81098ee2&gt;] ? ondemand_readahead+0x163/0x29a
 [&lt;ffffffff810990ce&gt;] page_cache_sync_readahead+0x38/0x3a
 [&lt;ffffffff81091d8a&gt;] generic_file_aio_read+0x2ab/0x67e
 [&lt;ffffffffa008cfbe&gt;] nfs_file_read+0xa4/0xc9 [nfs]
 [&lt;ffffffff810c22c4&gt;] do_sync_read+0xba/0xfa
 [&lt;ffffffff81177a47&gt;] ? security_file_permission+0x7b/0x84
 [&lt;ffffffff810c25dd&gt;] ? rw_verify_area+0xab/0xc8
 [&lt;ffffffff810c29a4&gt;] vfs_read+0xaa/0x13a
 [&lt;ffffffff810c2a79&gt;] sys_read+0x45/0x6c
 [&lt;ffffffff813ac37b&gt;] system_call_fastpath+0x16/0x1b

As can be seen, PG_private_2 (== PG_fscache) is set in the page flags.

Instrumenting fscache_mark_pages_cached() to verify whether page-&gt;mapping was
set appropriately showed that sometimes it wasn't.  This led to the discovery
that sometimes the page has apparently been reclaimed by the time the marker
got to see it.

Reported-by: M. Stevens &lt;m@tippett.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: use __printf not __attribute__((format(printf,...)))</title>
<updated>2011-11-01T00:30:54+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-11-01T00:11:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b9075fa968a0a4347aef35e235e2995c0e57dddd'/>
<id>b9075fa968a0a4347aef35e235e2995c0e57dddd</id>
<content type='text'>
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.

Done via script and a little typing.

$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
  grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
  xargs perl -n -i -e 'local $/; while (&lt;&gt;) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: "Kirill A. Shutemov" &lt;kirill@shutemov.name&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.

Done via script and a little typing.

$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
  grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
  xargs perl -n -i -e 'local $/; while (&lt;&gt;) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: "Kirill A. Shutemov" &lt;kirill@shutemov.name&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fscache: remove dead code under CONFIG_WORKQUEUE_DEBUGFS</title>
<updated>2011-05-25T15:39:44+00:00</updated>
<author>
<name>Amerigo Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2011-05-25T00:13:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e50c1f609c63223adaa38f5a79b18759a00adf72'/>
<id>e50c1f609c63223adaa38f5a79b18759a00adf72</id>
<content type='text'>
There is no CONFIG_WORKQUEUE_DEBUGFS any more, so this code is dead.

Signed-off-by: WANG Cong &lt;amwang@redhat.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no CONFIG_WORKQUEUE_DEBUGFS any more, so this code is dead.

Signed-off-by: WANG Cong &lt;amwang@redhat.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fscache: drop references to slow-work</title>
<updated>2010-07-22T20:58:58+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-07-20T20:09:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d098adfb7d281258173a43151483e52e21761021'/>
<id>d098adfb7d281258173a43151483e52e21761021</id>
<content type='text'>
fscache no longer uses slow-work.  Drop references to it.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fscache no longer uses slow-work.  Drop references to it.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
