From: Manfred Spraul <manfred@colorfullife.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
Davidlohr Bueso <dave@stgolabs.net>,
LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
1vier1@web.de, felixh@informatik.uni-bremen.de
Subject: Re: [PATCH 0/2] ipc/sem.c: sem_lock fixes
Date: Thu, 14 Jul 2016 18:40:08 +0200 [thread overview]
Message-ID: <1c8a2159-ea79-efdd-9a6b-c49e0267b477@colorfullife.com> (raw)
In-Reply-To: <20160713150525.8f703dfa5e83a534f8a51106@linux-foundation.org>
Hi Andrew,
On 07/14/2016 12:05 AM, Andrew Morton wrote:
> On Wed, 13 Jul 2016 07:06:50 +0200 Manfred Spraul <manfred@colorfullife.com> wrote:
>
>> Hi Andrew, Hi Peter,
>>
>> next version of the sem_lock() fixes:
>> The patches are again vs. tip.
>>
>> Patch 1 is ready for merging, Patch 2 is for review.
>>
>> - Patch 1 is the patch as in -next since January
>> It fixes the race that was found by Felix.
>> - Patch 2 removes the memory barriers that are part of the qspinlock
>> code.
>> - (The hysteresis patch would be patch 3. The risk of regressions
>> can't be ruled out, thus it must wait for benchmarks from real
>> workload tests)
> I think you're saying that if these two patches cause performance
> regressions, we will need ipc-sem-sem_lock-with-hysteresis.patch?
No, the two patches will not cause any regressions.
Commit 6062a8dc051 ("ipc,sem: fine grained locking for semtimedop") was
a huge scalability improvement for 99% of the users, but introduced a
regression for one workload.
Noone complained about it, so the workload must be rare.
Patch 3 now fixes the regression.
But we live with the introduced regression for 3 years, so give me (and
Davidlohr, and anyone else who wants to support) some more time.
Also on my TODO list: The queue merge/unmerge logic, i.e. commit
f269f40ad5ae ("ipc/sem.c: always use only one queue for alter
operations") might also win from some hysteresis.
My proposal:
- patch 1: merge towards main tree.
- patch 2: needs update. The barrier in sem_lock() is required. I'm not
yet sure about complexmode_enter(), perhaps with #ifndef
CONFIG_QUEUED_SPINLOCKS
- patch 3 should wait.
--
Manfred
next prev parent reply other threads:[~2016-07-14 16:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 5:06 Manfred Spraul
2016-07-13 5:06 ` [PATCH 1/2] ipc/sem.c: Fix complex_count vs. simple op race Manfred Spraul
2016-07-13 5:06 ` [PATCH 2/2] ipc/sem.c: Remove duplicated memory barriers Manfred Spraul
2016-07-13 16:16 ` Davidlohr Bueso
2016-07-13 18:37 ` Manfred Spraul
2016-07-16 1:27 ` [PATCH 1/2] ipc/sem.c: Fix complex_count vs. simple op race Davidlohr Bueso
2016-07-13 22:05 ` [PATCH 0/2] ipc/sem.c: sem_lock fixes Andrew Morton
2016-07-14 16:40 ` Manfred Spraul [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-10-01 18:40 Manfred Spraul
2016-06-25 17:37 Manfred Spraul
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=1c8a2159-ea79-efdd-9a6b-c49e0267b477@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=1vier1@web.de \
--cc=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=felixh@informatik.uni-bremen.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®