mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
flex_proportions: Allow N events instead of 1
When batching events (such as writing back N pages in a single I/O), it is better to do one flex_proportion operation instead of N. There is only one caller of __fprop_inc_percpu_max(), and it's the one we're going to change in the next patch, so rename it instead of adding a compatibility wrapper. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz>
This commit is contained in:
@@ -83,9 +83,10 @@ struct fprop_local_percpu {
|
||||
|
||||
int fprop_local_init_percpu(struct fprop_local_percpu *pl, gfp_t gfp);
|
||||
void fprop_local_destroy_percpu(struct fprop_local_percpu *pl);
|
||||
void __fprop_inc_percpu(struct fprop_global *p, struct fprop_local_percpu *pl);
|
||||
void __fprop_inc_percpu_max(struct fprop_global *p, struct fprop_local_percpu *pl,
|
||||
int max_frac);
|
||||
void __fprop_add_percpu(struct fprop_global *p, struct fprop_local_percpu *pl,
|
||||
long nr);
|
||||
void __fprop_add_percpu_max(struct fprop_global *p,
|
||||
struct fprop_local_percpu *pl, int max_frac, long nr);
|
||||
void fprop_fraction_percpu(struct fprop_global *p,
|
||||
struct fprop_local_percpu *pl, unsigned long *numerator,
|
||||
unsigned long *denominator);
|
||||
@@ -96,7 +97,7 @@ void fprop_inc_percpu(struct fprop_global *p, struct fprop_local_percpu *pl)
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
__fprop_inc_percpu(p, pl);
|
||||
__fprop_add_percpu(p, pl, 1);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user