linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: caiqian@redhat.com
Cc: kexec <kexec@lists.infradead.org>,
	linux-next@vger.kernel.org, torvalds@linux-foundation.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: kdump regression compared to v2.6.35
Date: Mon, 30 Aug 2010 19:31:44 +0200	[thread overview]
Message-ID: <4C7BEB00.9060801@kernel.org> (raw)
In-Reply-To: <4C7BDE6E.8030107@kernel.org>

Please try this one instead.  Thanks.

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a2dccfc..75cdbc2 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1224,6 +1224,8 @@ __acquires(&gcwq->lock)
 {
 	struct global_cwq *gcwq = worker->gcwq;
 	struct task_struct *task = worker->task;
+	static unsigned int cnt;
+	int rc;

 	while (true) {
 		/*
@@ -1232,8 +1234,11 @@ __acquires(&gcwq->lock)
 		 * it races with cpu hotunplug operation.  Verify
 		 * against GCWQ_DISASSOCIATED.
 		 */
-		if (!(gcwq->flags & GCWQ_DISASSOCIATED))
-			set_cpus_allowed_ptr(task, get_cpu_mask(gcwq->cpu));
+		if (!(gcwq->flags & GCWQ_DISASSOCIATED)) {
+			rc = set_cpus_allowed_ptr(task, get_cpu_mask(gcwq->cpu));
+			if (rc && ++cnt < 10)
+				printk("XXX set_cpus_allowed_ptr() failed w/ %d\n", rc);
+		}

 		spin_lock_irq(&gcwq->lock);
 		if (gcwq->flags & GCWQ_DISASSOCIATED)
@@ -1985,13 +1990,16 @@ repeat:
 		struct cpu_workqueue_struct *cwq = get_cwq(tcpu, wq);
 		struct global_cwq *gcwq = cwq->gcwq;
 		struct work_struct *work, *n;
+		bool bound;

 		__set_current_state(TASK_RUNNING);
 		mayday_clear_cpu(cpu, wq->mayday_mask);

 		/* migrate to the target cpu if possible */
 		rescuer->gcwq = gcwq;
-		worker_maybe_bind_and_lock(rescuer);
+		printk("XXX %s: rescuer dispatching to cpu%u\n", wq->name, gcwq->cpu);
+		bound = worker_maybe_bind_and_lock(rescuer);
+		printk("XXX %s: rescuer done binding, bound=%d\n", wq->name, bound);

 		/*
 		 * Slurp in all works issued via this workqueue and
@@ -3558,8 +3566,7 @@ static int __init init_workqueues(void)
 		spin_lock_init(&gcwq->lock);
 		INIT_LIST_HEAD(&gcwq->worklist);
 		gcwq->cpu = cpu;
-		if (cpu == WORK_CPU_UNBOUND)
-			gcwq->flags |= GCWQ_DISASSOCIATED;
+		gcwq->flags |= GCWQ_DISASSOCIATED;

 		INIT_LIST_HEAD(&gcwq->idle_list);
 		for (i = 0; i < BUSY_WORKER_HASH_SIZE; i++)
@@ -3583,6 +3590,8 @@ static int __init init_workqueues(void)
 		struct global_cwq *gcwq = get_gcwq(cpu);
 		struct worker *worker;

+		if (cpu != WORK_CPU_UNBOUND)
+			gcwq->flags &= ~GCWQ_DISASSOCIATED;
 		worker = create_worker(gcwq, true);
 		BUG_ON(!worker);
 		spin_lock_irq(&gcwq->lock);

  reply	other threads:[~2010-08-30 17:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <373987879.1541191283181021800.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-08-30 15:10 ` kdump regression compared to v2.6.35 caiqian
2010-08-30 16:38   ` Tejun Heo
2010-08-30 17:31     ` Tejun Heo [this message]
     [not found] <71887879.1606161283215975799.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-08-31  0:53 ` caiqian
2010-08-31  9:22   ` Tejun Heo
     [not found] <123671462.1479561283081998014.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-08-29 11:41 ` caiqian
2010-08-29 11:56   ` CAI Qian
2010-08-29 11:52     ` Tejun Heo
2010-08-29 12:03       ` CAI Qian
2010-08-29 12:36         ` Tejun Heo
2010-08-30  3:42           ` CAI Qian
2010-08-30  8:29             ` Tejun Heo
2010-08-30 10:24               ` CAI Qian
2010-08-30 12:50                 ` Tejun Heo
2010-08-30 14:02                   ` CAI Qian
2010-08-30 14:21                     ` Tejun Heo
2010-08-30 14:47                       ` CAI Qian
2010-08-30 14:51                         ` CAI Qian
2010-08-30 14:55                           ` Tejun Heo
     [not found] <2142316909.1477341283065016062.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-08-29  7:01 ` caiqian
2010-08-29  8:57   ` Tejun Heo
2010-08-29 11:24     ` CAI Qian
2010-08-29 11:21       ` Tejun Heo
     [not found] <229468156.1475641283020469212.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-08-28 18:36 ` caiqian
     [not found] <2082161789.1474781283008521258.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-08-28 15:19 ` caiqian
2010-08-27 12:35 CAI Qian

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=4C7BEB00.9060801@kernel.org \
    --to=tj@kernel.org \
    --cc=caiqian@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).