Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1428139

Re: [PATCH 2/2] ipc/sem: sem_lock with hysteresis

From Davidlohr Bueso <dave@stgolabs.net>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] ipc/sem: sem_lock with hysteresis
Date 2016-06-21 22:40 +0200
Message-ID <rMACJ-2cL-21@gated-at.bofh.it> (permalink)
References <rKbyN-6Lx-13@gated-at.bofh.it> <rLuJ3-kK-9@gated-at.bofh.it> <rLuJ3-kK-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 18 Jun 2016, Manfred Spraul wrote:

>sysv sem has two lock modes: One with per-semaphore locks, one lock mode
>with a single big lock for the whole array.
>When switching from the per-semaphore locks to the big lock, all
>per-semaphore locks must be scanned for ongoing operations.
>
>The patch adds a hysteresis for switching from the big lock to the per
>semaphore locks. This reduces how often the per-semaphore locks must
>be scanned.

Isn't this very arbitrary depending on the workload? Ie the other way around:
when we have a lot more simple ops going on not so good. While I'm more worried
about combinations that could cause enough complex ops to always delay taking
the finer grained lock, this change also obviously makes simple ops more expensive
on newly created segments.

In general I don't trust magic numbers much. What sort of numbers have you seen
with this patch? Is this a real concern (particularly because a lot of the sem->lock
work was because real world workloads were doing a lot more simple ops afaicr)?

Thanks,
Davidlohr

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

linux-next: manual merge of the akpm-current tree with the tip tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-06-15 07:30 +0200
  Re: linux-next: manual merge of the akpm-current tree with the tip  tree Manfred Spraul <manfred@colorfullife.com> - 2016-06-18 21:40 +0200
  [PATCH 2/2] ipc/sem: sem_lock with hysteresis Manfred Spraul <manfred@colorfullife.com> - 2016-06-18 22:10 +0200
    Re: [PATCH 2/2] ipc/sem: sem_lock with hysteresis Davidlohr Bueso <dave@stgolabs.net> - 2016-06-21 22:40 +0200
  [PATCH 1/2] ipc/sem.c: Fix complex_count vs. simple op race Manfred Spraul <manfred@colorfullife.com> - 2016-06-18 22:10 +0200
    Re: [PATCH 1/2] ipc/sem.c: Fix complex_count vs. simple op race Andrew Morton <akpm@linux-foundation.org> - 2016-06-21 01:10 +0200
    Re: [PATCH 1/2] ipc/sem.c: Fix complex_count vs. simple op race Davidlohr Bueso <dave@stgolabs.net> - 2016-06-21 02:40 +0200

csiph-web