Re: [PATCH] locking/mutex: Avoid spinner vs waiter starvation

From: Jason Low
Date: Thu Feb 04 2016 - 17:58:08 EST


On Thu, 2016-02-04 at 16:55 +0800, huang ying wrote:
> Hi, Low,
>
> On Thu, Feb 4, 2016 at 9:35 AM, Jason Low <jason.low2@xxxxxx> wrote:
> > I've done some testing with this patch with some of the AIM7 workloads
> > and found that this reduced throughput by about 10%. The reduction in
> > throughput is expected since spinning as a waiter is less efficient.
> >
> > Another observation I made is that the top waiter spinners would often
> > times require needing to reschedule before being able to acquire the
> > lock from spinning when there was high contention. A waiter can go into
> > the cycle of spin -> reschedule -> spin -> reschedule. So although the
> > chance of starvation is reduced, this patch doesn't fully address the
> > issue of waiter starvation.
>
> Could you share your workload? I want to reproduce it in 0day/LKP+ environment.

CC'ing Scott, who wrote the automation scripts.

Jason