From: Rik van Riel <riel@redhat.com>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Davidlohr Bueso <davidlohr.bueso@hp.com>,
hhuang@redhat.com, Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v2] ipc/sem.c: fix lockup, restore FIFO behavior
Date: Sat, 25 May 2013 13:55:47 -0400 [thread overview]
Message-ID: <51A0FB23.3050301@redhat.com> (raw)
In-Reply-To: <1369495011-2586-1-git-send-email-manfred@colorfullife.com>
On 05/25/2013 11:16 AM, Manfred Spraul wrote:
> The double coward solution:
> - wakeup stays FIFO
> - fast switch back to per-semaphore spinlock mode
>
> The patch
> a) fixes a lockup due to a missing restart.
> b) makes the wakeups again FIFO (as linux <= 3.0.9)
> c) tries to limit the time while in global lock mode as much
> as possible. (same as linux-3.0.10-rc1)
>
> Changes:
> - the wait-for-zero operations are moved into seperate lists. Thus they can
> be checked seperately, without rescanning the whole queue.
> - If a complex operation must sleep, then all pending change operations are
> moved into the global queue. This allows to keep everything FIFO.
> - When all complex operations have completed, the simple ops are moved
> back into the per-semaphore queues.
>
> Advantage:
> - FIFO. Dropping FIFO is a user visible change, and I'm a coward.
I am still not entirely convinced that FIFO is worthwhile,
but the code looks correct to me.
Acked-by: Rik van Riel <riel@redhat.com>
> - simpler check_restart logic.
> - Efficient handling of wait-for-zero semops, both simple and complex.
> - Fewer restarts in update_queue(), because pending wait-for-zero do not
> force a restart anymore.
>
> Other changes:
> - try_atomic_semop() also performs the semop. Thus rename the function.
>
> It passes tests with qemu, but not boot-tested due to EFI problems.
>
> Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
next prev parent reply other threads:[~2013-05-25 17:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-25 15:16 [PATCH v2] ipc/sem.c: fix lockup, restore FIFO behavior Manfred Spraul
2013-05-25 17:55 ` Rik van Riel [this message]
2013-05-25 18:32 ` Davidlohr Bueso
2013-05-25 20:00 ` Manfred Spraul
2013-05-26 3:19 ` Mike Galbraith
2013-05-26 3:43 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51A0FB23.3050301@redhat.com \
--to=riel@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=davidlohr.bueso@hp.com \
--cc=hhuang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.