summaryrefslogtreecommitdiffstats
path: root/lib/flex_proportions.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-09-08 02:51:30 +0200
committerTejun Heo <tj@kernel.org>2014-09-08 02:51:30 +0200
commit20ae00792c6f1f18fc4fc5965445a145df92827e (patch)
tree3ca91fac24ac0a672c105e766c4d5020e53be876 /lib/flex_proportions.c
parentpercpu_counter: add @gfp to percpu_counter_init() (diff)
downloadlinux-20ae00792c6f1f18fc4fc5965445a145df92827e.tar.xz
linux-20ae00792c6f1f18fc4fc5965445a145df92827e.zip
proportions: add @gfp to init functions
Percpu allocator now supports allocation mask. Add @gfp to [flex_]proportions init functions so that !GFP_KERNEL allocation masks can be used with them too. This patch doesn't make any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'lib/flex_proportions.c')
-rw-r--r--lib/flex_proportions.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/flex_proportions.c b/lib/flex_proportions.c
index b9d026bfcf38..8f25652f40d4 100644
--- a/lib/flex_proportions.c
+++ b/lib/flex_proportions.c
@@ -34,13 +34,13 @@
*/
#include <linux/flex_proportions.h>
-int fprop_global_init(struct fprop_global *p)
+int fprop_global_init(struct fprop_global *p, gfp_t gfp)
{
int err;
p->period = 0;
/* Use 1 to avoid dealing with periods with 0 events... */
- err = percpu_counter_init(&p->events, 1, GFP_KERNEL);
+ err = percpu_counter_init(&p->events, 1, gfp);
if (err)
return err;
seqcount_init(&p->sequence);
@@ -168,11 +168,11 @@ void fprop_fraction_single(struct fprop_global *p,
*/
#define PROP_BATCH (8*(1+ilog2(nr_cpu_ids)))
-int fprop_local_init_percpu(struct fprop_local_percpu *pl)
+int fprop_local_init_percpu(struct fprop_local_percpu *pl, gfp_t gfp)
{
int err;
- err = percpu_counter_init(&pl->events, 0, GFP_KERNEL);
+ err = percpu_counter_init(&pl->events, 0, gfp);
if (err)
return err;
pl->period = 0;