linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@cse.unsw.edu.au>
To: Andrew Morton <akpm@digeo.com>
Cc: Helge Hafting <helgehaf@aitel.hist.no>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: 2.5.64-mm7 - dies on smp with raid
Date: Sun, 16 Mar 2003 07:42:34 +1100	[thread overview]
Message-ID: <15987.36922.848433.245061@notabene.cse.unsw.edu.au> (raw)
In-Reply-To: message from Andrew Morton on Saturday March 15

On Saturday March 15, akpm@digeo.com wrote:
> 
> A lot of md updates went into Linus's tree overnight.  Can you get some more
> details for Neil?
> 
> Here is a wild guess:
> 
> diff -puN drivers/md/md.c~a drivers/md/md.c
> --- 25/drivers/md/md.c~a	2003-03-15 12:02:04.000000000 -0800
> +++ 25-akpm/drivers/md/md.c	2003-03-15 12:02:14.000000000 -0800
> @@ -2818,6 +2818,8 @@ int md_thread(void * arg)
>  
>  void md_wakeup_thread(mdk_thread_t *thread)
>  {
> +	if (!thread)
> +		return;
>  	dprintk("md: waking up MD thread %p.\n", thread);
>  	set_bit(THREAD_WAKEUP, &thread->flags);
>  	wake_up(&thread->wqueue);
> 

Looks like a good guess to me.

I hadn't considered raid0/linear properly in that last change suite.
They don't have a thread so there is nothing to wake up.

There are two places where the wrong thing will happen:
  do_md_run where it also calls md_update_sb which doesn't
    hurt but isn't really needed (there is never any point
    updating the superblock metadata for raid0/linear).
  restart_array where we switch back to read/write and wakeup
    the thread to see if there is anything to do.

We either need this "if(!thread)" test inside md_wakeup_thread
or at those two call sites, in which case we can avoid md_update_sb
as well.

I send one to Linus later...

Thanks,
NeilBrown
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

      reply	other threads:[~2003-03-15 20:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-15  9:17 2.5.64-mm7 Andrew Morton
2003-03-15 10:13 ` 2.5.64-mm7 Russell King
2003-03-15 17:38 ` 2.5.64-mm7 - dies on smp with raid Helge Hafting
2003-03-15 20:03   ` Andrew Morton
2003-03-15 20:42     ` Neil Brown [this message]

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=15987.36922.848433.245061@notabene.cse.unsw.edu.au \
    --to=neilb@cse.unsw.edu.au \
    --cc=akpm@digeo.com \
    --cc=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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