Re: SDHC card affected by preemption model in 2.6.35

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

On Mon, Feb 21, 2011 at 4:53 AM, Johannes Reif <reif@xxxxxxxxxxxxx> wrote:
> Hello Venkat, Hello Mathieu,
>
>>  No. I was working on some other things lately. What card are you using
>> and
>>  how often are you seeing this ?
>>
>>  Regards,
>>  Venkat.
>
> We get the timeout Problem every time:
> [    1.888732] Waiting for root device /dev/mmcblk0p2...
> [    4.193603] mmc0: error -110 whilst initialising SD card
>
> Right now the issue occurs with following cards CONFIG_PREEMPT=y enabled:

There is a bug in the kernel workqueues. I observed it in 2.6.36.3 (it
seems to have been introduced in 2.6.36 and is still in 2.6.37.1), One
of my colleagues was investigating and contacted the author of the
workqueue code (Tejun Heo). Tejun sent us the following patch:

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 11869fa..90a17ca 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2047,6 +2047,15 @@ repeat:
 				move_linked_works(work, scheduled, &n);

 		process_scheduled_works(rescuer);
+
+		/*
+		 * Leave this gcwq.  If keep_working() is %true, notify a
+		 * regular worker; otherwise, we end up with 0 concurrency
+		 * and stalling the execution.
+		 */
+		if (keep_working(gcwq))
+			wake_up_worker(gcwq);
+
 		spin_unlock_irq(&gcwq->lock);
 	}


For us, this was causing card insertion events to not be processed.
For us it was a race condition and depended on when the timer tick
occured in relation to other processing, and since you're talking
about PREEMPTION making a difference, I thought I would throw this out
as maybe being relevant.

Dave Hylands
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux