linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* might_sleep warnings in gereric_make_request
@ 2006-04-20  3:05 Zhikun Wang
  2006-04-20  3:31 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Zhikun Wang @ 2006-04-20  3:05 UTC (permalink / raw)
  To: Neil Brown, linux-raid, linux-scsi, Eric Moore

Hi:
	I want to call genric_make_request in bio->bi_end_io function. But it incurs might_sleep warnings! I wonder this method is safe in the kernel? Thanks a lot! 


cfq: depth 4 reached, tagging now on
Debug: sleeping function called from invalid context at drivers/block/ll_rw_blk.c:2878
in_atomic():1, irqs_disabled():0
 [<c0279467>] generic_make_request+0x1e/0x23a
 [<c011ad1a>] recalc_task_prio+0xc1/0x150
 [<c011adff>] activate_task+0x56/0x65
 [<e0a35dfb>] raid1_end_sync_read+0x245/0x364 [raid1]
 [<c011be66>] __wake_up_common+0x39/0x59
 [<e0a35bb6>] raid1_end_sync_read+0x0/0x364 [raid1]
 [<c0181f29>] bio_endio+0x3d/0x68
 [<c015576c>] mempool_free+0x67/0x1ca
 [<c0279a25>] __end_that_request_first+0xc1/0x1f5
 [<c0274a70>] elv_queue_empty+0x12/0x1b
 [<e0821e45>] scsi_end_request+0x1e/0x210 [scsi_mod]
 [<c015576c>] mempool_free+0x67/0x1ca
 [<c02e5460>] ip_local_deliver+0x60/0x1a2
 [<e082231b>] scsi_io_completion+0x16c/0x4c2 [scsi_mod]
 [<c011ad1a>] recalc_task_prio+0xc1/0x150
 [<c011ad1a>] recalc_task_prio+0xc1/0x150
 [<e0869fe2>] sd_rw_intr+0x137/0x3b1 [sd_mod]
 [<e081b3a9>] scsi_finish_command+0x8e/0xc1 [scsi_mod]
 [<c0103c0e>] common_interrupt+0x1a/0x20
 [<e081b2d0>] scsi_softirq+0x9e/0xc3 [scsi_mod]
 [<c0127f1e>] __do_softirq+0x3e/0x8a
 [<c0105c29>] do_softirq+0x3e/0x42
 =======================
 [<c0105b24>] do_IRQ+0x51/0x82
 [<c0105b24>] do_IRQ+0x51/0x82
 [<c0103c0e>] common_interrupt+0x1a/0x20
 [<c010101a>] default_idle+0x0/0x29
 [<c0101040>] default_idle+0x26/0x29
 [<c01010a6>] cpu_idle+0x34/0x4c
 [<c03be71f>] start_kernel+0x154/0x1ab
 [<c03be2fe>] unknown_bootoption+0x0/0x1cd
cfq: depth 4 reached, tagging now on
Debug: sleeping function called from invalid context at drivers/block/ll_rw_blk.c:2878
in_atomic():1, irqs_disabled():0
 [<c0279467>] generic_make_request+0x1e/0x23a
 [<c015576c>] mempool_free+0x67/0x1ca
 [<c0276e35>] __generic_unplug_device+0x31/0x33
 [<c011be66>] __wake_up_common+0x39/0x59
 [<e0a35dfb>] raid1_end_sync_read+0x245/0x364 [raid1]
 [<e08f67a3>] raid_done_sync+0x2b/0x4a [raid]
 [<c02cbae7>] skb_checksum+0x55/0x2cc
 [<e0a35bb6>] raid1_end_sync_read+0x0/0x364 [raid1]
 [<c0181f29>] bio_endio+0x3d/0x68
 [<c015576c>] mempool_free+0x67/0x1ca
 [<c0279a25>] __end_that_request_first+0xc1/0x1f5
 [<c0274a70>] elv_queue_empty+0x12/0x1b
 [<e0821e45>] scsi_end_request+0x1e/0x210 [scsi_mod]
 [<c015576c>] mempool_free+0x67/0x1ca
 [<c02e5460>] ip_local_deliver+0x60/0x1a2
 [<e082231b>] scsi_io_completion+0x16c/0x4c2 [scsi_mod]
 [<e0869fe2>] sd_rw_intr+0x137/0x3b1 [sd_mod]
 [<c012c59e>] cascade+0x21/0x3b
 [<e081b3a9>] scsi_finish_command+0x8e/0xc1 [scsi_mod]
 [<c0103c0e>] common_interrupt+0x1a/0x20
 [<e081b2d0>] scsi_softirq+0x9e/0xc3 [scsi_mod]
 [<c0127f1e>] __do_softirq+0x3e/0x8a
 [<c0105c29>] do_softirq+0x3e/0x42
 =======================
 [<c0105b24>] do_IRQ+0x51/0x82
 [<c0105b24>] do_IRQ+0x51/0x82
 [<c0103c0e>] common_interrupt+0x1a/0x20
 [<c010101a>] default_idle+0x0/0x29
 [<c0101040>] default_idle+0x26/0x29
 [<c01010a6>] cpu_idle+0x34/0x4c
 [<c03be71f>] start_kernel+0x154/0x1ab
 [<c03be2fe>] unknown_bootoption+0x0/0x1cd




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: might_sleep warnings in gereric_make_request
  2006-04-20  3:05 might_sleep warnings in gereric_make_request Zhikun Wang
@ 2006-04-20  3:31 ` Matthew Wilcox
       [not found]   ` <200604201142426250967@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2006-04-20  3:31 UTC (permalink / raw)
  To: Zhikun Wang; +Cc: Neil Brown, linux-raid, linux-scsi, Eric Moore

On Thu, Apr 20, 2006 at 11:05:55AM +0800, Zhikun Wang wrote:
> Hi:
> 	I want to call genric_make_request in bio->bi_end_io function. But it incurs might_sleep warnings! I wonder this method is safe in the kernel? Thanks a lot! 
> 
> 
> cfq: depth 4 reached, tagging now on
> Debug: sleeping function called from invalid context at drivers/block/ll_rw_blk.c:2878
> in_atomic():1, irqs_disabled():0

You can't call generic_make_request() from interrupt context.  What are
you trying to do?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: might_sleep warnings in gereric_make_request
       [not found]   ` <200604201142426250967@gmail.com>
@ 2006-04-20  3:47     ` Matthew Wilcox
  0 siblings, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2006-04-20  3:47 UTC (permalink / raw)
  To: Zhikun Wang; +Cc: linux-scsi, linux-raid

On Thu, Apr 20, 2006 at 11:42:45AM +0800, Zhikun Wang wrote:
> I want to write one disk data to another disk. So i call generic_make_request in first bio->bi_end_io!
> Would you please suggest another approach?
> Thanks!    

Like raid-1?  Maybe drivers/md/raid1.c would give you some useful hints.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-20  3:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-20  3:05 might_sleep warnings in gereric_make_request Zhikun Wang
2006-04-20  3:31 ` Matthew Wilcox
     [not found]   ` <200604201142426250967@gmail.com>
2006-04-20  3:47     ` Matthew Wilcox

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).