Age | Commit message (Collapse) | Author |
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
|
|
update path
|
|
There is a need for a polling interface for SRCU grace
periods, so this commit supplies get_state_synchronize_srcu(),
start_poll_synchronize_srcu(), and poll_state_synchronize_srcu() for this
purpose. The first can be used if future grace periods are inevitable
(perhaps due to a later call_srcu() invocation), the second if future
grace periods might not otherwise happen, and the third to check if a
grace period has elapsed since the corresponding call to either of the
first two.
As with get_state_synchronize_rcu() and cond_synchronize_rcu(),
the return value from either get_state_synchronize_srcu() or
start_poll_synchronize_srcu() must be passed in to a later call to
poll_state_synchronize_srcu().
Link: https://lore.kernel.org/rcu/20201112201547.GF3365678@moria.home.lan/
Reported-by: Kent Overstreet <kent.overstreet@gmail.com>
[ paulmck: Add EXPORT_SYMBOL_GPL() per kernel test robot feedback. ]
[ paulmck: Apply feedback from Neeraj Upadhyay. ]
Link: https://lore.kernel.org/lkml/20201117004017.GA7444@paulmck-ThinkPad-P72/
Reviewed-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
|
|
There is a need for a polling interface for SRCU grace periods.
This polling needs to initiate an SRCU grace period without having
to queue (and manage) a callback. This commit therefore splits the
Tree SRCU __call_srcu() function into callback-initialization and
queuing/start-grace-period portions, with the latter in a new function
named srcu_gp_start_if_needed(). This function may be passed a NULL
callback pointer, in which case it will refrain from queuing anything.
Why have the new function mess with queuing? Locking considerations,
of course!
Link: https://lore.kernel.org/rcu/20201112201547.GF3365678@moria.home.lan/
Reported-by: Kent Overstreet <kent.overstreet@gmail.com>
Reviewed-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
update
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
This will be used to prevent a nasty cache coherency issue for O_DIRECT
writes; O_DIRECT writes need to shoot down the range of the page cache
corresponding to the part of the file being written to - but, if the
file is mapped in, userspace can pass in an address in that mapping to
pwrite(), causing those pages to be faulted back into the page cache
in get_user_pages().
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
This reverts commit 8675f74ac343b24c14b3991dc6f999c138723eec.
|
|
|
|
|
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
|
|
|
|
Fork of drivers/md/bcache
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
Prep work for bcachefs - being a fork of bcache it also uses closures
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
This results in fewer branches/cmov instructions in the inner loop
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
|
|
|
|
|
|
No longer has any users, so remove it
|
|
|
|
|
|
Convert generic_file_buffered_read() to get pages to read from in
batches, and then copy data to userspace from many pages at once - in
particular, we now don't touch any cachelines that might be contended
while we're in the loop to copy data to userspace.
This is is a performance improvement on workloads that do buffered reads
with large blocksizes, and a very large performance improvement if that
file is also being accessed concurrently by different threads.
On smaller reads (512 bytes), there's a very small performance
improvement (1%, within the margin of error).
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
This is prep work for changing generic_file_buffered_read() to use
find_get_pages_contig() to batch up all the pagecache lookups.
This patch should be functionally identical to the existing code and
changes as little as of the flow control as possible. More refactoring
could be done, this patch is intended to be relatively minimal.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|