public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: David Miller <davem@davemloft.net>
Cc: dan.j.williams@intel.com, linux-kernel@vger.kernel.org,
	neilb@suse.de, galak@kernel.crashing.org,
	christopher.leech@intel.com, alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH rev2 1/4] dmaengine: enable mutliple clients and operations
Date: Tue, 1 Aug 2006 01:10:33 -0700	[thread overview]
Message-ID: <20060801011033.4c3484df.akpm@osdl.org> (raw)
In-Reply-To: <20060731.231158.91311705.davem@davemloft.net>

On Mon, 31 Jul 2006 23:11:58 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> 
> Can I ask that the known bugs in the I/O AT DMA code be fixed
> before we start adding new features to it?
> 
> Specifically, the lock_cpu_hotplug() call in net_dma_rebalance()
> is still there and being invoked with a spinlock held.  The
> spinlock is grabbed by the caller, netdev_dma_event() which
> grabs the net_dma_event_lock spinlock.
> 
> You cannot invoke lock_cpu_hotplug() while holding a spinlock
> because lock_cpu_hotplug(), as seen in kernel/cpu.c, takes
> a semaphore which can sleep.  Sleeping while holding a spinlock
> is not allowed.
> 
> This is the second time I have tried to make the Intel developers
> aware of this bug.  So please fix this problem.
> 

Please just delete the lock_cpu_hotplug()/unlock_cpu_hotplug() calls.  Any
code which runs inside preempt_disable() is automatically protected from
cpu hot-unplug.

It's not presently 100% protected against cpu hot-add, but it's good enough
for now: the setting of the flag in cpu_online_map is the last thing which
happens.  To make this 100% tight we should probably run __cpu_up() via
stop_machine_run().

  reply	other threads:[~2006-08-01  8:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28 18:16 [PATCH rev2 1/4] dmaengine: enable mutliple clients and operations Dan Williams
2006-07-28 18:16 ` [PATCH rev2 2/4] dmaengine: reduce backend address permutations Dan Williams
2006-07-28 18:16 ` [PATCH rev2 3/4] dmaengine: expose per channel dma mapping characteristics to clients Dan Williams
2006-07-28 18:16 ` [PATCH rev2 4/4] dmaengine: add memset as an asynchronous dma operation Dan Williams
2006-08-01  6:11 ` [PATCH rev2 1/4] dmaengine: enable mutliple clients and operations David Miller
2006-08-01  8:10   ` Andrew Morton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-08-01 18:03 Leech, Christopher

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=20060801011033.4c3484df.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=christopher.leech@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox