lkml.org 
[lkml]   [2013]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] ipc/sem.c: Fix missing wakeups in do_smart_update_queue()
On 05/26/2013 05:08 AM, Manfred Spraul wrote:
> do_smart_update_queue() is called when an operation
> (semop, semctl(SETVAL), semctl(SETALL), ...) modified the array.
> It must check which of the sleeping tasks can proceed.
>
> do_smart_update_queue() missed a few wakeups:
> - if a sleeping complex op was completed, then all per-semaphore queues
> must be scanned - not only those that were modified by *sops
> - if a sleeping simple op proceeded, then the global queue
> must be scanned again
>
> And:
> - the test for "|sops == NULL) before scanning the global
> queue is not required: If the global queue is empty, then
> it doesn't need to be scanned - regardless of the reason
> for calling do_smart_update_queue()
>
> The patch is not optimized, i.e. even completing a wait-for-zero
> operation causes a rescan. This is done to keep the patch as simple as
> possible.
> Avoiding unnecessary scans is implemented in the following patches.
>
> Signed-off-by: Manfred Spraul <manfred@colorfullife.com>

Very much not optimized, but we need to fix the regression.

Acked-by: Rik van Riel <riel@redhat.com>



\
 
 \ /
  Last update: 2013-05-27 20:41    [W:0.321 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site