On Fri, Feb 3, 2017 at 2:28 PM, Russell King - ARM Linux
wrote:
> On Fri, Feb 03, 2017 at 01:08:40PM -0800, Kees Cook wrote:
>> On Fri, Feb 3, 2017 at 12:29 PM, Russell King - ARM Linux
>> wrote:
>> > On Fri, Feb 03, 2017 at 11:45:56AM -0800, Kees Cook wrote:
>> >> On Fri, Feb 3, 2017 at 9:52 AM,
On Fri, Feb 03, 2017 at 01:08:40PM -0800, Kees Cook wrote:
> On Fri, Feb 3, 2017 at 12:29 PM, Russell King - ARM Linux
> wrote:
> > On Fri, Feb 03, 2017 at 11:45:56AM -0800, Kees Cook wrote:
> >> On Fri, Feb 3, 2017 at 9:52 AM, Laura Abbott wrote:
> >> > diff --git a/arch/Kconfig b/arch/Kconfig
>
On Fri, Feb 3, 2017 at 12:29 PM, Russell King - ARM Linux
wrote:
> On Fri, Feb 03, 2017 at 11:45:56AM -0800, Kees Cook wrote:
>> On Fri, Feb 3, 2017 at 9:52 AM, Laura Abbott wrote:
>> > diff --git a/arch/Kconfig b/arch/Kconfig
>> > index 99839c2..22ee01e 100644
>> > --- a/arch/Kconfig
>> > +++ b/
On Fri, Feb 03, 2017 at 11:45:56AM -0800, Kees Cook wrote:
> On Fri, Feb 3, 2017 at 9:52 AM, Laura Abbott wrote:
> > diff --git a/arch/Kconfig b/arch/Kconfig
> > index 99839c2..22ee01e 100644
> > --- a/arch/Kconfig
> > +++ b/arch/Kconfig
> > @@ -781,4 +781,32 @@ config VMAP_STACK
> > the
On Fri, Feb 3, 2017 at 9:52 AM, Laura Abbott wrote:
>
> Both of these options are poorly named. The features they provide are
> necessary for system security and should not be considered debug only.
> Change the name to something that accurately describes what these
> options do.
It may help to e
On Fri, Feb 3, 2017 at 9:52 AM, Laura Abbott wrote:
> There are multiple architectures that support CONFIG_DEBUG_RODATA and
> CONFIG_SET_MODULE_RONX. These options also now have the ability to be
> turned off at runtime. Move these to an architecture independent
> location and make these options d
On Fri, 03 Feb 2017 13:42:46 -0500, Waiman Long said:
> This patch set does guarantee some minimum performance level, but it
> can't guarantee fairness for all the lock waiters.
OK, sounds like it's a situation that's statistically unlikely, but it has
protections against starvation so the system
On 02/03/2017 01:23 PM, valdis.kletni...@vt.edu wrote:
> On Fri, 03 Feb 2017 13:03:50 -0500, Waiman Long said:
>
>> On a 2-socket 36-core E5-2699 v3 system (HT off) running on a 4.10
>> WW futex TP futex Glibc
>> -
On Fri, Feb 03, 2017 at 09:52:22AM -0800, Laura Abbott wrote:
>
> Both of these options are poorly named. The features they provide are
> necessary for system security and should not be considered debug only.
> Change the name to something that accurately describes what these
> options do.
>
> Si
On Fri, 03 Feb 2017 13:03:50 -0500, Waiman Long said:
> On a 2-socket 36-core E5-2699 v3 system (HT off) running on a 4.10
> WW futex TP futex Glibc
> -
> Total locking ops35,707,234
On Fri, Feb 03, 2017 at 09:52:21AM -0800, Laura Abbott wrote:
> There are multiple architectures that support CONFIG_DEBUG_RODATA and
> CONFIG_SET_MODULE_RONX. These options also now have the ability to be
> turned off at runtime. Move these to an architecture independent
> location and make these
This microbenchmark simulates how the use of different futex types
can affect the actual performanace of userspace mutex locks. The
usage is:
perf bench futex mutex
Three sets of simple mutex lock and unlock functions are implemented
using the wait-wake and PI futexes respectively. This
v4->v5:
- Fix 0-day kernel build test compilation warnings.
- Extract out non-TP futexes futex-mutex and futex-rwlock
microbenchmarks as separate patches, as suggested by Arnaldo.
- Rebased to the latest tip tree & use running_clock() instead
of sched_clock().
v3->v4:
- Properly
The futex_pi_state structure will be overloaded in later patches to
store state information about non-PI futexes. So the structure name
itself is no longer a good description of its purpose. So its name
is changed to futex_state, a more generic name.
Some of the functions that process the futex st
Two new helper functions cmpxchg_futex_value() and get_futex_value()
are added to access and change the futex value without the hash
bucket lock. As a result, page fault is enabled and the page will
be faulted in if not present yet.
Signed-off-by: Waiman Long
---
kernel/futex.c | 15 +++
This microbenchmark simulates how the use of different futex types
can affect the actual performanace of userspace rwlock locks. The
usage is:
perf bench futex rwlock
Two sets of simple rwlock lock and unlock functions are implemented
using the wait-wake futexes and glibc rwlock respecti
A new futex_setup_timer() helper function is added to consolidate all
the hrtimer_sleeper setup code.
Signed-off-by: Waiman Long
---
kernel/futex.c | 67 --
1 file changed, 37 insertions(+), 30 deletions(-)
diff --git a/kernel/futex.c b/ke
The current TP futexes has no guarantee that the top waiter
(serialization mutex owner) can get the lock within a finite time.
As a result, lock starvation can happen.
A lock handoff mechanism is added to the TP futexes to prevent lock
starvation from happening. The idea is that the top waiter can
Two new helper functions (task_pi_list_add & task_pi_list_del)
are created to consolidate all the pure pi_state_list addition and
insertion codes. The set_owner argument in task_pi_list_add() will
be needed in a later patch.
Signed-off-by: Waiman Long
---
kernel/futex.c | 64
This patch adds a new document file on how to use the TP futexes.
Signed-off-by: Waiman Long
---
Documentation/00-INDEX | 2 +
Documentation/tp-futex.txt | 161 +
2 files changed, 163 insertions(+)
create mode 100644 Documentation/tp-futex.txt
Currently, the futex state objects can only be located indirectly as
hash bucket => futex_q => futex state
Actually it can be beneficial in some cases to locate the futex state
object directly from the hash bucket without the futex_q middleman.
Therefore, a new list head to link the futex
To better understand how the TP futexes are performing, it is useful to
return the internal status on the TP futexes. The FUTEX_LOCK futex(2)
syscall will now return a positive status code if no error happens. The
status code consists of the following 3 fields:
1) Bits 00-07: code on how the lock
As the futex_state structure will be overloaded in later patches
to be used by non-PI futexes, it is necessary to add a type field to
distinguish among different types of futexes.
Signed-off-by: Waiman Long
---
kernel/futex.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
Unlike other futexes, TP futexes do not accept the specification of
a timeout value. To align with the other futexes, timeout support is
now added. However, the timeout isn't as precise as the other futex
types due to the fact that timer expiration can't be detected when
the thread is waiting in t
All the TP futex lock waiters are serialized in the kernel using a
kernel mutex which acts like a wait queue. The order at which the
waiters popped out from the wait queue will affect performance when
exclusive (writer) and shared (reader) lock waiters are mixed in the
queue. The worst case scenari
The TP futexes was designed to support userspace mutually exclusive
locks. They are now extended to support userspace reader/writer
locks as well.
Two new futex command codes are added:
1) FUTEX_LOCK_SHARED - to acquire a shared lock (reader-lock)
2) FUTEX_UNLOCK_SHARED - to release a shred lock
The TP-futexes prefer writers as the code path is much simpler for
them. This may not be good for overall system performance especially
if there is a fair amount of reader activities.
This patch enables kernel reader to steal the lock when the futex is
currently reader-owned and the lock handoff m
For debugging purpose, it is sometimes useful to dump the internal
states in the futex hash bucket table. This patch adds a file
"futex_hash_table" in debugfs root filesystem to dump the internal
futex states.
Signed-off-by: Waiman Long
---
kernel/futex.c | 82 +++
The tp-futex.txt was updated to add description about shared locking
support.
Signed-off-by: Waiman Long
---
Documentation/tp-futex.txt | 163 +++--
1 file changed, 143 insertions(+), 20 deletions(-)
diff --git a/Documentation/tp-futex.txt b/Documentation
The TP futexes don't have code to handle the death of futex
owners. There are 2 different cases that need to be considered.
As top waiter gets a reference to the task structure of the futex
owner, the task structure will never go away even if the owner dies.
When the futex owner died while the top
This patch extends the futex-mutex and futex-rwlock microbenchmarks to
test userspace mutexes and rwlocks built on top of the TP futexes. We
can then compare the relative performance of those userspace locks
based on different type of futexes.
Signed-off-by: Waiman Long
---
tools/perf/bench/fute
A new futex implementation called throughput-optimized (TP) futexes
is introduced. The goal of this new futex type is to maximize locking
throughput at the expense of fairness and deterministic latency. Its
throughput is higher than that of the wait-wake futexes especially
on systems with a large n
Unlike wake_up_process(), wake_up_q() doesn't tell us how many
tasks have been woken up. This information can sometimes be useful
for tracking purpose. So wake_up_q() is now modified to return that
information.
Signed-off-by: Waiman Long
---
include/linux/sched/wake_q.h | 2 +-
kernel/futex.c
Hi,
This is a follow up to my proposal to rename/refactor CONFIG_DEBUG_RODATA
and CONFIG_DEBUG_SET_MODULE_RONX. Among other objections, there shouldn't
be 'debug' in the name since these provide necessary kernel protection.
v2 takes a slightly different approach to this per feedback. Patch #1 mov
Both of these options are poorly named. The features they provide are
necessary for system security and should not be considered debug only.
Change the name to something that accurately describes what these
options do.
Signed-off-by: Laura Abbott
---
v2: This patch is now doing the renaming of C
There are multiple architectures that support CONFIG_DEBUG_RODATA and
CONFIG_SET_MODULE_RONX. These options also now have the ability to be
turned off at runtime. Move these to an architecture independent
location and make these options def_bool y for almost all of those
arches.
Signed-off-by: Lau
I've written this patch, and it seems to work, but I don't really know
what I'm doing and I fear I may have broken something. I don't know what:
required_argument = 1
optional_arguments = 4
mean, so I don't know whether I should have adjusted them when adding
this new option.
>From 268
On Wed, 01 Feb 2017, Jonathan Corbet wrote:
> On Tue, 31 Jan 2017 20:18:05 +0200
> Jani Nikula wrote:
>
>> Considering the small amount of python code to compile (assuming sphinx
>> itself has .pyc around), the impact on build is neglible.
>
> Hey...don't you know that performance-impacting patch
On 2 February 2017 at 16:37, Logan Gunthorpe wrote:
>
>
> On 01/02/17 05:10 AM, Emil Velikov wrote:
>> You can keep it roughly as-is if you're ~reasonably certain one won't
>> change it in the future.
>
> I've made the change anyway. I think it's better now.
>
>> Some teams frown upon adding new I
On 2017-02-02 17:08, Rob Herring wrote:
> On Tue, Jan 31, 2017 at 1:36 AM, Peter Rosin wrote:
>> If you see this new driver as something that is superseding the existing
>> i2c-mux-gpio driver, I'm sad to inform you that the code is not simply
>> not there. i2c-mux-gpio has acpi support and users
40 matches
Mail list logo