<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/Documentation/filesystems/caching, branch v5.0.1</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v5.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v5.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2018-11-20T16:30:43+00:00</updated>
<entry>
<title>Documentation: Use "while" instead of "whilst"</title>
<updated>2018-11-20T16:30:43+00:00</updated>
<author>
<name>Will Deacon</name>
<email>will.deacon@arm.com</email>
</author>
<published>2018-11-19T11:02:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=806654a9667c6f60a65f1a4a4406082b5de51233'/>
<id>urn:sha1:806654a9667c6f60a65f1a4a4406082b5de51233</id>
<content type='text'>
Whilst making an unrelated change to some Documentation, Linus sayeth:

  | Afaik, even in Britain, "whilst" is unusual and considered more
  | formal, and "while" is the common word.
  |
  | [...]
  |
  | Can we just admit that we work with computers, and we don't need to
  | use þe eald Englisc spelling of words that most of the world never
  | uses?

dictionary.com refers to the word as "Chiefly British", which is
probably an undesirable attribute for technical documentation.

Replace all occurrences under Documentation/ with "while".

Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Liam Girdwood &lt;lgirdwood@gmail.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Michael Halcrow &lt;mhalcrow@google.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>fscache: Pass object size in rather than calling back for it</title>
<updated>2018-04-06T13:05:14+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2018-04-04T12:41:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=ee1235a9a06813429c201bf186397a6feeea07bf'/>
<id>urn:sha1:ee1235a9a06813429c201bf186397a6feeea07bf</id>
<content type='text'>
Pass the object size in to fscache_acquire_cookie() and
fscache_write_page() rather than the netfs providing a callback by which it
can be received.  This makes it easier to update the size of the object
when a new page is written that extends the object.

The current object size is also passed by fscache to the check_aux
function, obviating the need to store it in the aux data.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Anna Schumaker &lt;anna.schumaker@netapp.com&gt;
Tested-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
</entry>
<entry>
<title>fscache: Attach the index key and aux data to the cookie</title>
<updated>2018-04-04T12:41:28+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2018-04-04T12:41:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=402cb8dda949d9b8c0df20ad2527d139faad7ca1'/>
<id>urn:sha1:402cb8dda949d9b8c0df20ad2527d139faad7ca1</id>
<content type='text'>
Attach copies of the index key and auxiliary data to the fscache cookie so
that:

 (1) The callbacks to the netfs for this stuff can be eliminated.  This
     can simplify things in the cache as the information is still
     available, even after the cache has relinquished the cookie.

 (2) Simplifies the locking requirements of accessing the information as we
     don't have to worry about the netfs object going away on us.

 (3) The cache can do lazy updating of the coherency information on disk.
     As long as the cache is flushed before reboot/poweroff, there's no
     need to update the coherency info on disk every time it changes.

 (4) Cookies can be hashed or put in a tree as the index key is easily
     available.  This allows:

     (a) Checks for duplicate cookies can be made at the top fscache layer
     	 rather than down in the bowels of the cache backend.

     (b) Caching can be added to a netfs object that has a cookie if the
     	 cache is brought online after the netfs object is allocated.

A certain amount of space is made in the cookie for inline copies of the
data, but if it won't fit there, extra memory will be allocated for it.

The downside of this is that live cache operation requires more memory.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Anna Schumaker &lt;anna.schumaker@netapp.com&gt;
Tested-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
</entry>
<entry>
<title>fscache: remove unused -&gt;now_uncached callback</title>
<updated>2017-09-07T00:27:26+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2017-09-06T23:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=26b433d0da062d6e19d75350c0171d3cf8ff560d'/>
<id>urn:sha1:26b433d0da062d6e19d75350c0171d3cf8ff560d</id>
<content type='text'>
Patch series "Ranged pagevec lookup", v2.

In this series I make pagevec_lookup() update the index (to be
consistent with pagevec_lookup_tag() and also as a preparation for
ranged lookups), provide ranged variant of pagevec_lookup() and use it
in places where it makes sense.  This not only removes some common code
but is also a measurable performance win for some use cases (see patch
4/10) where radix tree is sparse and searching &amp; grabing of a page after
the end of the range has measurable overhead.

This patch (of 10):

The callback doesn't ever get called.  Remove it.

Link: http://lkml.kernel.org/r/20170726114704.7626-2-jack@suse.cz
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>FS-Cache: Count the number of initialised operations</title>
<updated>2015-04-02T13:28:53+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2015-02-25T13:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=03cdd0e4b9a98ae995b81cd8f58e992ec3f44ae2'/>
<id>urn:sha1:03cdd0e4b9a98ae995b81cd8f58e992ec3f44ae2</id>
<content type='text'>
Count and display through /proc/fs/fscache/stats the number of initialised
operations.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Steve Dickson &lt;steved@redhat.com&gt;
Acked-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
</content>
</entry>
<entry>
<title>FS-Cache: Count culled objects and objects rejected due to lack of space</title>
<updated>2015-02-24T10:05:27+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2015-02-19T23:47:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=182d919b84902eece162c63ed3d476c8016b4197'/>
<id>urn:sha1:182d919b84902eece162c63ed3d476c8016b4197</id>
<content type='text'>
Count the number of objects that get culled by the cache backend and the
number of objects that the cache backend declines to instantiate due to lack
of space in the cache.

These numbers are made available through /proc/fs/fscache/stats

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Steve Dickson &lt;steved@redhat.com&gt;
Acked-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
</content>
</entry>
<entry>
<title>sched: Remove proliferation of wait_on_bit() action functions</title>
<updated>2014-07-16T13:10:39+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2014-07-07T05:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=743162013d40ca612b4cb53d3a200dff2d9ab26e'/>
<id>urn:sha1:743162013d40ca612b4cb53d3a200dff2d9ab26e</id>
<content type='text'>
The current "wait_on_bit" interface requires an 'action'
function to be provided which does the actual waiting.
There are over 20 such functions, many of them identical.
Most cases can be satisfied by one of just two functions, one
which uses io_schedule() and one which just uses schedule().

So:
 Rename wait_on_bit and        wait_on_bit_lock to
        wait_on_bit_action and wait_on_bit_lock_action
 to make it explicit that they need an action function.

 Introduce new wait_on_bit{,_lock} and wait_on_bit{,_lock}_io
 which are *not* given an action function but implicitly use
 a standard one.
 The decision to error-out if a signal is pending is now made
 based on the 'mode' argument rather than being encoded in the action
 function.

 All instances of the old wait_on_bit and wait_on_bit_lock which
 can use the new version have been changed accordingly and their
 action functions have been discarded.
 wait_on_bit{_lock} does not return any specific error code in the
 event of a signal so the caller must check for non-zero and
 interpolate their own error code as appropriate.

The wait_on_bit() call in __fscache_wait_on_invalidate() was
ambiguous as it specified TASK_UNINTERRUPTIBLE but used
fscache_wait_bit_interruptible as an action function.
David Howells confirms this should be uniformly
"uninterruptible"

The main remaining user of wait_on_bit{,_lock}_action is NFS
which needs to use a freezer-aware schedule() call.

A comment in fs/gfs2/glock.c notes that having multiple 'action'
functions is useful as they display differently in the 'wchan'
field of 'ps'. (and /proc/$PID/wchan).
As the new bit_wait{,_io} functions are tagged "__sched", they
will not show up at all, but something higher in the stack.  So
the distinction will still be visible, only with different
function names (gds2_glock_wait versus gfs2_glock_dq_wait in the
gfs2/glock.c case).

Since first version of this patch (against 3.15) two new action
functions appeared, on in NFS and one in CIFS.  CIFS also now
uses an action function that makes the same freezer aware
schedule call as NFS.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt; (fscache, keys)
Acked-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt; (gfs2)
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Steve French &lt;sfrench@samba.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: http://lkml.kernel.org/r/20140707051603.28027.72349.stgit@notabene.brown
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>FS-Cache: Provide the ability to enable/disable cookies</title>
<updated>2013-09-27T17:40:25+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-09-20T23:09:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=94d30ae90a00cafe686c1057be57f4885f963abf'/>
<id>urn:sha1:94d30ae90a00cafe686c1057be57f4885f963abf</id>
<content type='text'>
Provide the ability to enable and disable fscache cookies.  A disabled cookie
will reject or ignore further requests to:

	Acquire a child cookie
	Invalidate and update backing objects
	Check the consistency of a backing object
	Allocate storage for backing page
	Read backing pages
	Write to backing pages

but still allows:

	Checks/waits on the completion of already in-progress objects
	Uncaching of pages
	Relinquishment of cookies

Two new operations are provided:

 (1) Disable a cookie:

	void fscache_disable_cookie(struct fscache_cookie *cookie,
				    bool invalidate);

     If the cookie is not already disabled, this locks the cookie against other
     dis/enablement ops, marks the cookie as being disabled, discards or
     invalidates any backing objects and waits for cessation of activity on any
     associated object.

     This is a wrapper around a chunk split out of fscache_relinquish_cookie(),
     but it reinitialises the cookie such that it can be reenabled.

     All possible failures are handled internally.  The caller should consider
     calling fscache_uncache_all_inode_pages() afterwards to make sure all page
     markings are cleared up.

 (2) Enable a cookie:

	void fscache_enable_cookie(struct fscache_cookie *cookie,
				   bool (*can_enable)(void *data),
				   void *data)

     If the cookie is not already enabled, this locks the cookie against other
     dis/enablement ops, invokes can_enable() and, if the cookie is not an
     index cookie, will begin the procedure of acquiring backing objects.

     The optional can_enable() function is passed the data argument and returns
     a ruling as to whether or not enablement should actually be permitted to
     begin.

     All possible failures are handled internally.  The cookie will only be
     marked as enabled if provisional backing objects are allocated.

A later patch will introduce these to NFS.  Cookie enablement during nfs_open()
is then contingent on i_writecount &lt;= 0.  can_enable() checks for a race
between open(O_RDONLY) and open(O_WRONLY/O_RDWR).  This simplifies NFS's cookie
handling and allows us to get rid of open(O_RDONLY) accidentally introducing
caching to an inode that's open for writing already.

One operation has its API modified:

 (3) Acquire a cookie.

	struct fscache_cookie *fscache_acquire_cookie(
		struct fscache_cookie *parent,
		const struct fscache_cookie_def *def,
		void *netfs_data,
		bool enable);

     This now has an additional argument that indicates whether the requested
     cookie should be enabled by default.  It doesn't need the can_enable()
     function because the caller must prevent multiple calls for the same netfs
     object and it doesn't need to take the enablement lock because no one else
     can get at the cookie before this returns.

Signed-off-by: David Howells &lt;dhowells@redhat.com
</content>
</entry>
<entry>
<title>fscache: Netfs function for cleanup post readpages</title>
<updated>2013-09-06T08:17:30+00:00</updated>
<author>
<name>Milosz Tanski</name>
<email>milosz@adfin.com</email>
</author>
<published>2013-08-21T21:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=5a6f282a2052bb13171b53f03b34501cf72c33f1'/>
<id>urn:sha1:5a6f282a2052bb13171b53f03b34501cf72c33f1</id>
<content type='text'>
Currently the fscache code expect the netfs to call fscache_readpages_or_alloc
inside the aops readpages callback.  It marks all the pages in the list
provided by readahead with PG_private_2.  In the cases that the netfs fails to
read all the pages (which is legal) it ends up returning to the readahead and
triggering a BUG.  This happens because the page list still contains marked
pages.

This patch implements a simple fscache_readpages_cancel function that the netfs
should call before returning from readpages.  It will revoke the pages from the
underlying cache backend and unmark them.

The problem was originally worked out in the Ceph devel tree, but it also
occurs in CIFS.  It appears that NFS, AFS and 9P are okay as read_cache_pages()
will clean up the unprocessed pages in the case of an error.

This can be used to address the following oops:

[12410647.597278] BUG: Bad page state in process petabucket  pfn:3d504e
[12410647.597292] page:ffffea000f541380 count:0 mapcount:0 mapping:
	(null) index:0x0
[12410647.597298] page flags: 0x200000000001000(private_2)

...

[12410647.597334] Call Trace:
[12410647.597345]  [&lt;ffffffff815523f2&gt;] dump_stack+0x19/0x1b
[12410647.597356]  [&lt;ffffffff8111def7&gt;] bad_page+0xc7/0x120
[12410647.597359]  [&lt;ffffffff8111e49e&gt;] free_pages_prepare+0x10e/0x120
[12410647.597361]  [&lt;ffffffff8111fc80&gt;] free_hot_cold_page+0x40/0x170
[12410647.597363]  [&lt;ffffffff81123507&gt;] __put_single_page+0x27/0x30
[12410647.597365]  [&lt;ffffffff81123df5&gt;] put_page+0x25/0x40
[12410647.597376]  [&lt;ffffffffa02bdcf9&gt;] ceph_readpages+0x2e9/0x6e0 [ceph]
[12410647.597379]  [&lt;ffffffff81122a8f&gt;] __do_page_cache_readahead+0x1af/0x260
[12410647.597382]  [&lt;ffffffff81122ea1&gt;] ra_submit+0x21/0x30
[12410647.597384]  [&lt;ffffffff81118f64&gt;] filemap_fault+0x254/0x490
[12410647.597387]  [&lt;ffffffff8113a74f&gt;] __do_fault+0x6f/0x4e0
[12410647.597391]  [&lt;ffffffff810125bd&gt;] ? __switch_to+0x16d/0x4a0
[12410647.597395]  [&lt;ffffffff810865ba&gt;] ? finish_task_switch+0x5a/0xc0
[12410647.597398]  [&lt;ffffffff8113d856&gt;] handle_pte_fault+0xf6/0x930
[12410647.597401]  [&lt;ffffffff81008c33&gt;] ? pte_mfn_to_pfn+0x93/0x110
[12410647.597403]  [&lt;ffffffff81008cce&gt;] ? xen_pmd_val+0xe/0x10
[12410647.597405]  [&lt;ffffffff81005469&gt;] ? __raw_callee_save_xen_pmd_val+0x11/0x1e
[12410647.597407]  [&lt;ffffffff8113f361&gt;] handle_mm_fault+0x251/0x370
[12410647.597411]  [&lt;ffffffff812b0ac4&gt;] ? call_rwsem_down_read_failed+0x14/0x30
[12410647.597414]  [&lt;ffffffff8155bffa&gt;] __do_page_fault+0x1aa/0x550
[12410647.597418]  [&lt;ffffffff8108011d&gt;] ? up_write+0x1d/0x20
[12410647.597422]  [&lt;ffffffff8113141c&gt;] ? vm_mmap_pgoff+0xbc/0xe0
[12410647.597425]  [&lt;ffffffff81143bb8&gt;] ? SyS_mmap_pgoff+0xd8/0x240
[12410647.597427]  [&lt;ffffffff8155c3ae&gt;] do_page_fault+0xe/0x10
[12410647.597431]  [&lt;ffffffff81558818&gt;] page_fault+0x28/0x30

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>FS-Cache: Fix heading in documentation</title>
<updated>2013-09-06T08:17:30+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-09-05T12:06:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=696f69b6b088f0f5b9470a5d008871c96354f531'/>
<id>urn:sha1:696f69b6b088f0f5b9470a5d008871c96354f531</id>
<content type='text'>
Fix a heading in the documentation to make it consistent with the contents
list.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
</feed>
