All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@petalogix.com>
To: Tejun Heo <tj@kernel.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Sachin Sant <sachinp@in.ibm.com>,
	linux-s390@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>
Subject: Re: [PATCH wq#for-next] workqueue: fix how cpu number is stored in work->data
Date: Thu, 22 Jul 2010 22:13:27 +0200	[thread overview]
Message-ID: <4C48A667.2000702@petalogix.com> (raw)
In-Reply-To: <4C4838B8.1080400@kernel.org>

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 <tj@kernel.org>
> Reported-by: Sachin Sant <sachinp@in.ibm.com>
> Reported-by: Michal Simek <michal.simek@petalogix.com>
> Reported-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
> ---
> 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 <monstr@monstr.eu>

Thanks,
Michal


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

  parent reply	other threads:[~2010-07-22 20:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-21 10:40 [-next July 21] s390 build failure : kernel/workqueue.o Sachin Sant
2010-07-21 15:57 ` Tejun Heo
2010-07-22  5:49   ` Sachin Sant
2010-07-22  9:25   ` Martin Schwidefsky
2010-07-22 12:25     ` [PATCH wq#for-next] workqueue: fix how cpu number is stored in work->data Tejun Heo
2010-07-22 15:10       ` Martin Schwidefsky
2010-07-22 20:41         ` Tejun Heo
2010-07-22 20:13       ` Michal Simek [this message]
2010-07-22  7:19 ` [-next July 21] s390 build failure : kernel/workqueue.o Michal Simek

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=4C48A667.2000702@petalogix.com \
    --to=michal.simek@petalogix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=sachinp@in.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=tj@kernel.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.