lkml.org 
[lkml]   [2005]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] Add disk hotswap support to libata RESEND #2
George Anzinger wrote:
> Jim Ramsay wrote:
>> On 8/23/05, Jim Ramsay <jim.ramsay@gmail.com> wrote:
>>> I've applied this set
>>> of patches to a 2.6.11 kernel (with few problems) and ran into a bunch
>>> of "scheduling while atomic" errors when hotplugging a drive, culprit
>>> being probably scsi_sysfs.c
...
>> After further debugging, it appears that the problem is the debounce
>> timer in libata-core.c.
>>
>> Timers appear to operate in an atomic context, so timers should not be
>> allowed to call scsi_remove_device, which eventually schedules.
>>
>> Any suggestions on the best way to fix this?
>
> Workqueue, perhaps.

The USB and IEEE 1394 subsystems have kernel threads which manage node
additions and removals (usb/storage/usb.c, ieee1394/nodemgr.c). The add
and remove functions of their storage drivers are called from these
threads' non-atomic context. However if you don't need an own thread for
any further bus management purposes, a workqueue looks suitable for hot
plugging and unplugging.
--
Stefan Richter
-=====-=-=-= =--- ==---
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-24 03:22    [W:0.781 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site