Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268917
b: refs/heads/master
c: 740969f
h: refs/heads/master
i:
  268915: b2afba9
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Sep 13, 2011
1 parent ea9bdb0 commit 276a219
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cdcc136ffd264849a943acb42c36ffe9b458f811
refs/heads/master: 740969f91e950b64a18fdd0a25164cdee042abf0
6 changes: 3 additions & 3 deletions trunk/include/linux/proportions.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct prop_local_percpu {
*/
int shift;
unsigned long period;
spinlock_t lock; /* protect the snapshot state */
raw_spinlock_t lock; /* protect the snapshot state */
};

int prop_local_init_percpu(struct prop_local_percpu *pl);
Expand Down Expand Up @@ -106,11 +106,11 @@ struct prop_local_single {
*/
unsigned long period;
int shift;
spinlock_t lock; /* protect the snapshot state */
raw_spinlock_t lock; /* protect the snapshot state */
};

#define INIT_PROP_LOCAL_SINGLE(name) \
{ .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
{ .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
}

int prop_local_init_single(struct prop_local_single *pl);
Expand Down
12 changes: 6 additions & 6 deletions trunk/lib/proportions.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ prop_adjust_shift(int *pl_shift, unsigned long *pl_period, int new_shift)

int prop_local_init_percpu(struct prop_local_percpu *pl)
{
spin_lock_init(&pl->lock);
raw_spin_lock_init(&pl->lock);
pl->shift = 0;
pl->period = 0;
return percpu_counter_init(&pl->events, 0);
Expand Down Expand Up @@ -226,7 +226,7 @@ void prop_norm_percpu(struct prop_global *pg, struct prop_local_percpu *pl)
if (pl->period == global_period)
return;

spin_lock_irqsave(&pl->lock, flags);
raw_spin_lock_irqsave(&pl->lock, flags);
prop_adjust_shift(&pl->shift, &pl->period, pg->shift);

/*
Expand All @@ -247,7 +247,7 @@ void prop_norm_percpu(struct prop_global *pg, struct prop_local_percpu *pl)
percpu_counter_set(&pl->events, 0);

pl->period = global_period;
spin_unlock_irqrestore(&pl->lock, flags);
raw_spin_unlock_irqrestore(&pl->lock, flags);
}

/*
Expand Down Expand Up @@ -324,7 +324,7 @@ void prop_fraction_percpu(struct prop_descriptor *pd,

int prop_local_init_single(struct prop_local_single *pl)
{
spin_lock_init(&pl->lock);
raw_spin_lock_init(&pl->lock);
pl->shift = 0;
pl->period = 0;
pl->events = 0;
Expand Down Expand Up @@ -356,7 +356,7 @@ void prop_norm_single(struct prop_global *pg, struct prop_local_single *pl)
if (pl->period == global_period)
return;

spin_lock_irqsave(&pl->lock, flags);
raw_spin_lock_irqsave(&pl->lock, flags);
prop_adjust_shift(&pl->shift, &pl->period, pg->shift);
/*
* For each missed period, we half the local counter.
Expand All @@ -367,7 +367,7 @@ void prop_norm_single(struct prop_global *pg, struct prop_local_single *pl)
else
pl->events = 0;
pl->period = global_period;
spin_unlock_irqrestore(&pl->lock, flags);
raw_spin_unlock_irqrestore(&pl->lock, flags);
}

/*
Expand Down

0 comments on commit 276a219

Please sign in to comment.