[lkml]   [2010]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH wq#for-next] workqueue: fix how cpu number is stored in work->data
Tejun Heo wrote:
> Once a work starts execution, its data contains the cpu number it was
> on instead of pointing to cwq. This is added by commit 7a22ad75
> (workqueue: carry cpu number in work data once execution starts) to
> reliably determine the work was last on even if the workqueue itself
> was destroyed inbetween.
> Whether data points to a cwq or contains a cpu number was
> distinguished by comparing the value against PAGE_OFFSET. The
> assumption was that a cpu number should be below PAGE_OFFSET while a
> pointer to cwq should be above it. However, on architectures which
> use separate address spaces for user and kernel spaces, this doesn't
> hold as PAGE_OFFSET is zero.
> Fix it by using an explicit flag, WORK_STRUCT_CWQ, to mark what the
> data field contains. If the flag is set, it's pointing to a cwq;
> otherwise, it contains a cpu number.
> Reported on s390 and microblaze during linux-next testing.
> Signed-off-by: Tejun Heo <>
> Reported-by: Sachin Sant <>
> Reported-by: Michal Simek <>
> Reported-by: Martin Schwidefsky <>
> ---
> Yeah, that was a stupid assumption by me. Can you guys please test
> whether this fixes the problem?
> Thanks.

Microblaze is OK.

Tested-by: Michal Simek <>


Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663

 \ /
  Last update: 2010-07-22 22:19    [W:0.059 / U:37.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site