diff options
author | Tejun Heo <tj@kernel.org> | 2014-09-20 01:27:25 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-09-20 01:27:25 -0400 |
commit | e625305b390790717cf2cccf61efb81299647028 (patch) | |
tree | 87bde164e935bf06fca1b4adfa26d23f1cca4238 /drivers/spi/spi-sh-msiof.c | |
parent | 4843c3320c3d23ab4ecf520f5eaf485aff8c7252 (diff) | |
download | talos-obmc-linux-e625305b390790717cf2cccf61efb81299647028.tar.gz talos-obmc-linux-e625305b390790717cf2cccf61efb81299647028.zip |
percpu-refcount: make percpu_ref based on longs instead of ints
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@kernel.org>
Cc: Kent Overstreet <kmo@daterainc.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Diffstat (limited to 'drivers/spi/spi-sh-msiof.c')
0 files changed, 0 insertions, 0 deletions