[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1317022114.9084.53.camel@twins>
Date: Mon, 26 Sep 2011 09:28:34 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Gilad Ben-Yossef <gilad@...yossef.com>
Cc: linux-kernel@...r.kernel.org,
Frederic Weisbecker <fweisbec@...il.com>,
Russell King <linux@....linux.org.uk>,
Chris Metcalf <cmetcalf@...era.com>, linux-mm@...ck.org,
Christoph Lameter <cl@...ux-foundation.org>,
Pekka Enberg <penberg@...nel.org>,
Matt Mackall <mpm@...enic.com>
Subject: Re: [PATCH 4/5] mm: Only IPI CPUs to drain local pages if they exist
On Sun, 2011-09-25 at 11:54 +0300, Gilad Ben-Yossef wrote:
> +static inline void inc_pcp_count(int cpu, struct per_cpu_pages *pcp, int count)
> +{
> + if (unlikely(!total_cpu_pcp_count))
if (unlikely(!__this_cpu_read(total_cpu_pco_count))
> + cpumask_set_cpu(cpu, cpus_with_pcp);
> +
> + total_cpu_pcp_count += count;
__this_cpu_add(total_cpu_pcp_count, count);
> + pcp->count += count;
> +}
> +
> +static inline void dec_pcp_count(int cpu, struct per_cpu_pages *pcp, int count)
> +{
> + pcp->count -= count;
> + total_cpu_pcp_count -= count;
__this_cpu_sub(total_cpu_pcp_count, count);
> +
> + if (unlikely(!total_cpu_pcp_count))
if (unlikely(!__this_cpu_read(total_cpu_pcp_count))
> + cpumask_clear_cpu(cpu, cpus_with_pcp);
> +}
--
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