All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>,
	hpa@zytor.com, tglx@linutronix.de, andi@firstfloor.org,
	hch@infradead.org, linux-kernel@vger.kernel.org,
	Arjan van de Ven <arjan@linux.intel.com>
Subject: Re: [patch 1/2] x86, fpu: split FPU state from task struct - v4
Date: Thu, 6 Mar 2008 11:03:31 -0800	[thread overview]
Message-ID: <20080306190331.GG28006@linux-os.sc.intel.com> (raw)
In-Reply-To: <20080306151832.GA10092@elte.hu>

On Thu, Mar 06, 2008 at 04:18:32PM +0100, Ingo Molnar wrote:
> 
> > > Split the FPU save area from the task struct. This allows easy 
> > > migration of FPU context, and it's generally cleaner. It also allows 
> > > the following two optimizations:
> 
> the atomicity bug is still there:
> 
> [ 1230.409772] BUG: sleeping function called from invalid context at mm/slab.c:>
> [ 1230.409772] in_atomic():0, irqs_disabled():1
> [ 1230.409772] Pid: 1187, comm: awk Not tainted 2.6.25-rc4-sched-devel.git-x86->[ 1230.409772]
> [ 1230.409772] Call Trace:
> [ 1230.409772]  [<ffffffff8022255b>] ? do_page_fault+0x3eb/0xa80
> [ 1230.409772]  [<ffffffff8022c68e>] __might_sleep+0xce/0xf0
> [ 1230.409772]  [<ffffffff8028c299>] kmem_cache_alloc+0xf9/0x120
> [ 1230.409772]  [<ffffffff80214338>] init_fpu+0x98/0x100
> [ 1230.409772]  [<ffffffff8020ec10>] math_state_restore+0x20/0x80
> [ 1230.409772]  [<ffffffff809b8cc9>] error_exit+0x0/0x60
> 
> config and bootlog attached.

My bad. I overlooked the fact that exception handling by the processor
automatically disables interrupts and my tested configs didn't have
CONFIG_DEBUG_SPINLOCK_SLEEP set. My previous fix took care of only 32bit kernels
as they were disabling interrupts explicitly for PREEMPT kernels.

I will post a -v5 fixing this.

> # CONFIG_DEBUG_KERNEL is not set

BTW, In the .config you sent, you don't have CONFIG_DEBUG_SPINLOCK_SLEEP or
CONFIG_DEBUG_KERNEL set. How come you are seeing those backtraces?

thanks,
suresh

  reply	other threads:[~2008-03-06 19:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 23:37 [patch 1/2] x86, fpu: split FPU state from task struct - v4 Suresh Siddha
2008-03-04 23:37 ` [patch 2/2] x86, fpu: lazy allocation of FPU area " Suresh Siddha
2008-03-06 12:40   ` Bastien ROUCARIES
2008-03-06 12:17 ` [patch 1/2] x86, fpu: split FPU state from task struct " Ingo Molnar
2008-03-06 15:18   ` Ingo Molnar
2008-03-06 19:03     ` Suresh Siddha [this message]
2008-03-06 19:19       ` Ingo Molnar

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=20080306190331.GG28006@linux-os.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=andi@firstfloor.org \
    --cc=arjan@linux.intel.com \
    --cc=hch@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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.