[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190827163204.29903-1-will@kernel.org>
Date: Tue, 27 Aug 2019 17:31:58 +0100
From: Will Deacon <will@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: Will Deacon <will@...nel.org>, Kees Cook <keescook@...omium.org>,
Ingo Molnar <mingo@...nel.org>,
Elena Reshetova <elena.reshetova@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Hanjun Guo <guohanjun@...wei.com>,
Jan Glauber <jglauber@...vell.com>
Subject: [PATCH v2 0/6] Rework REFCOUNT_FULL using atomic_fetch_* operations
Hi all,
This is version two of the patches I previously posted here:
https://lkml.kernel.org/r/20190802101000.12958-1-will@kernel.org
Changes since v1 include:
* Avoid duplicate WARNs when incrementing from zero
* Some crude lktdm perf results to motivate the change:
# perf stat -r 3 -B -- echo {ATOMIC,REFCOUNT}_TIMING >/sys/kernel/debug/provoke-crash/DIRECT
# arm64
ATOMIC_TIMING: 46.50451 +- 0.00134 seconds time elapsed ( +- 0.00% )
REFCOUNT_TIMING (REFCOUNT_FULL, mainline): 77.57522 +- 0.00982 seconds time elapsed ( +- 0.01% )
REFCOUNT_TIMING (REFCOUNT_FULL, this series): 48.7181 +- 0.0256 seconds time elapsed ( +- 0.05% )
# x86
ATOMIC_TIMING: 31.6225 +- 0.0776 seconds time elapsed ( +- 0.25% )
REFCOUNT_TIMING (!REFCOUNT_FULL, mainline/x86 asm): 31.6689 +- 0.0901 seconds time elapsed ( +- 0.28% )
REFCOUNT_TIMING (REFCOUNT_FULL, mainline): 53.203 +- 0.138 seconds time elapsed ( +- 0.26% )
REFCOUNT_TIMING (REFCOUNT_FULL, this series): 31.7408 +- 0.0486 seconds time elapsed ( +- 0.15% )
Cheers,
Will
Cc: Kees Cook <keescook@...omium.org>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Elena Reshetova <elena.reshetova@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Hanjun Guo <guohanjun@...wei.com>
Cc: Jan Glauber <jglauber@...vell.com>
--->8
Will Deacon (6):
lib/refcount: Define constants for saturation and max refcount values
lib/refcount: Ensure integer operands are treated as signed
lib/refcount: Remove unused refcount_*_checked() variants
lib/refcount: Move bulk of REFCOUNT_FULL implementation into header
lib/refcount: Improve performance of generic REFCOUNT_FULL code
lib/refcount: Consolidate REFCOUNT_{MAX,SATURATED} definitions
drivers/misc/lkdtm/refcount.c | 8 --
include/linux/refcount.h | 236 +++++++++++++++++++++++++++++++++++++----
lib/refcount.c | 237 +-----------------------------------------
3 files changed, 218 insertions(+), 263 deletions(-)
--
2.11.0
Powered by blists - more mailing lists