Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287425
b: refs/heads/master
c: 2a48301
h: refs/heads/master
i:
  287423: 72452ef
v: v3
  • Loading branch information
Seth Jennings authored and Greg Kroah-Hartman committed Feb 8, 2012
1 parent f1091e4 commit 714a69e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: a9d3c9e3c575ee09c905e07ae7cc1d52e2548d05
refs/heads/master: 2a4830110b90deb4ee99b1ab8c8ebb120f27c0c8
14 changes: 7 additions & 7 deletions trunk/drivers/staging/zcache/zcache-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,8 @@ static unsigned int zv_max_zsize = (PAGE_SIZE / 8) * 7;
*/
static unsigned int zv_max_mean_zsize = (PAGE_SIZE / 8) * 5;

static unsigned long zv_curr_dist_counts[NCHUNKS];
static unsigned long zv_cumul_dist_counts[NCHUNKS];
static atomic_t zv_curr_dist_counts[NCHUNKS];
static atomic_t zv_cumul_dist_counts[NCHUNKS];

static struct zv_hdr *zv_create(struct xv_pool *xvpool, uint32_t pool_id,
struct tmem_oid *oid, uint32_t index,
Expand All @@ -674,8 +674,8 @@ static struct zv_hdr *zv_create(struct xv_pool *xvpool, uint32_t pool_id,
&page, &offset, ZCACHE_GFP_MASK);
if (unlikely(ret))
goto out;
zv_curr_dist_counts[chunks]++;
zv_cumul_dist_counts[chunks]++;
atomic_inc(&zv_curr_dist_counts[chunks]);
atomic_inc(&zv_cumul_dist_counts[chunks]);
zv = kmap_atomic(page, KM_USER0) + offset;
zv->index = index;
zv->oid = *oid;
Expand All @@ -697,7 +697,7 @@ static void zv_free(struct xv_pool *xvpool, struct zv_hdr *zv)

ASSERT_SENTINEL(zv, ZVH);
BUG_ON(chunks >= NCHUNKS);
zv_curr_dist_counts[chunks]--;
atomic_dec(&zv_curr_dist_counts[chunks]);
size -= sizeof(*zv);
BUG_ON(size == 0);
INVERT_SENTINEL(zv, ZVH);
Expand Down Expand Up @@ -737,7 +737,7 @@ static int zv_curr_dist_counts_show(char *buf)
char *p = buf;

for (i = 0; i < NCHUNKS; i++) {
n = zv_curr_dist_counts[i];
n = atomic_read(&zv_curr_dist_counts[i]);
p += sprintf(p, "%lu ", n);
chunks += n;
sum_total_chunks += i * n;
Expand All @@ -753,7 +753,7 @@ static int zv_cumul_dist_counts_show(char *buf)
char *p = buf;

for (i = 0; i < NCHUNKS; i++) {
n = zv_cumul_dist_counts[i];
n = atomic_read(&zv_cumul_dist_counts[i]);
p += sprintf(p, "%lu ", n);
chunks += n;
sum_total_chunks += i * n;
Expand Down

0 comments on commit 714a69e

Please sign in to comment.