[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140920052653.GB7926@mtj.dyndns.org>
Date: Sat, 20 Sep 2014 01:26:53 -0400
From: Tejun Heo <tj@...nel.org>
To: cl@...ux-foundation.org, kmo@...erainc.com
Cc: linux-kernel@...r.kernel.org, Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH 3/3] percpu-refcount: make percpu_ref based on longs
instead of ints
On Mon, Sep 08, 2014 at 11:12:22AM +0900, Tejun Heo wrote:
> percpu_ref is currently based on ints and the number of refs it can
> cover is (1 << 31). This makes it impossible to use a percpu_ref to
> count memory objects or pages on 64bit machines as it may overflow.
> This forces those users to somehow aggregate the references before
> contributing to the percpu_ref which is often cumbersome and sometimes
> challenging to get the same level of performance as using the
> percpu_ref directly.
>
> While using ints for the percpu counters makes them pack tighter on
> 64bit machines, the possible gain from using ints instead of longs is
> extremely small compared to the overall gain from per-cpu operation.
> This patch makes percpu_ref based on longs so that it can be used to
> directly count memory objects or pages.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Kent Overstreet <kmo@...erainc.com>
> Cc: Johannes Weiner <hannes@...xchg.org>
Applied 1 and 3 to percpu/for-3.18.
Thanks.
--
tejun
--
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