[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C42BAE5.9020606@cs.helsinki.fi>
Date: Sun, 18 Jul 2010 11:27:17 +0300
From: Pekka Enberg <penberg@...helsinki.fi>
To: Nitin Gupta <ngupta@...are.org>
CC: Hugh Dickins <hugh.dickins@...cali.co.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Greg KH <greg@...ah.com>,
Dan Magenheimer <dan.magenheimer@...cle.com>,
Rik van Riel <riel@...hat.com>, Avi Kivity <avi@...hat.com>,
Christoph Hellwig <hch@...radead.org>,
Minchan Kim <minchan.kim@...il.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
linux-mm <linux-mm@...ck.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/8] Basic zcache functionality
Nitin Gupta wrote:
> +static void zcache_add_stat(struct zcache_pool *zpool,
> + enum zcache_pool_stats_index idx, s64 val)
> +{
> + struct zcache_pool_stats_cpu *stats;
> +
> + preempt_disable();
> + stats = __this_cpu_ptr(zpool->stats);
> + u64_stats_update_begin(&stats->syncp);
> + stats->count[idx] += val;
> + u64_stats_update_end(&stats->syncp);
> + preempt_enable();
> +
> +}
You should probably use this_cpu_inc() here.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists