* About mmc delayed workqueue.
@ 2011-03-29 23:33 NamJae Jeon
2011-03-29 23:34 ` Ben Dooks
0 siblings, 1 reply; 6+ messages in thread
From: NamJae Jeon @ 2011-03-29 23:33 UTC (permalink / raw)
To: cjb, linux-mmc
Hi. Chris.
I found some problem in mmc driver. As you know, in nand trend, emmc
nand is used booting device in embededd product.
It means that kernel, rootfs image is stored in emmc nand device. and
when rescaning mmc, mmc driver is working by delay work queue.
It can be cause "can not mount rootfs". If kernel mounting is faster
than mmc rescan, this problem would occur..
I changed to schedule_work instead of mmc_schedule_delayed_work. I can
make patch & test.
could you tell me your opinion ?
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About mmc delayed workqueue.
2011-03-29 23:33 About mmc delayed workqueue NamJae Jeon
@ 2011-03-29 23:34 ` Ben Dooks
2011-03-29 23:44 ` Chris Ball
0 siblings, 1 reply; 6+ messages in thread
From: Ben Dooks @ 2011-03-29 23:34 UTC (permalink / raw)
To: NamJae Jeon; +Cc: cjb, linux-mmc
On Wed, Mar 30, 2011 at 08:33:12AM +0900, NamJae Jeon wrote:
> Hi. Chris.
>
> I found some problem in mmc driver. As you know, in nand trend, emmc
> nand is used booting device in embededd product.
yeah, a really nasty trend if you ask me.
> It means that kernel, rootfs image is stored in emmc nand device. and
> when rescaning mmc, mmc driver is working by delay work queue.
>
> It can be cause "can not mount rootfs". If kernel mounting is faster
> than mmc rescan, this problem would occur..
>
> I changed to schedule_work instead of mmc_schedule_delayed_work. I can
> make patch & test.
>
> could you tell me your opinion ?
Use root_wait on the commandline and it will wait for the root device
to become reayd.
> Thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Ben Dooks, ben@fluff.org, http://www.fluff.org/ben/
Large Hadron Colada: A large Pina Colada that makes the universe disappear.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About mmc delayed workqueue.
2011-03-29 23:34 ` Ben Dooks
@ 2011-03-29 23:44 ` Chris Ball
[not found] ` <AANLkTi=5R9w0k_Hg=htyDc=aQDA+t1HOLvWtfAOvMo+z@mail.gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2011-03-29 23:44 UTC (permalink / raw)
To: Ben Dooks; +Cc: NamJae Jeon, linux-mmc
Hi,
On Tue, Mar 29 2011, Ben Dooks wrote:
> On Wed, Mar 30, 2011 at 08:33:12AM +0900, NamJae Jeon wrote:
>> Hi. Chris.
>>
>> I found some problem in mmc driver. As you know, in nand trend, emmc
>> nand is used booting device in embededd product.
>
> yeah, a really nasty trend if you ask me.
>
>> It means that kernel, rootfs image is stored in emmc nand device. and
>> when rescaning mmc, mmc driver is working by delay work queue.
>>
>> It can be cause "can not mount rootfs". If kernel mounting is faster
>> than mmc rescan, this problem would occur..
>>
>> I changed to schedule_work instead of mmc_schedule_delayed_work. I can
>> make patch & test.
>>
>> could you tell me your opinion ?
>
> Use root_wait on the commandline and it will wait for the root device
> to become reayd.
Ben's right that you should use "rootwait" (I don't think it works with
the underscore in the middle), rootdelay=5 if you want the boot to fail
if the partition isn't mounted after a little extra time, or an initrd
if you want full control over rootfs mounting.
These parameters are documented in Documentation/kernel-parameters.txt.
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About mmc delayed workqueue.
[not found] ` <AANLkTi=5R9w0k_Hg=htyDc=aQDA+t1HOLvWtfAOvMo+z@mail.gmail.com>
@ 2011-03-30 0:40 ` NamJae Jeon
2011-03-30 2:17 ` Chris Ball
1 sibling, 0 replies; 6+ messages in thread
From: NamJae Jeon @ 2011-03-30 0:40 UTC (permalink / raw)
To: Chris Ball, linux-mmc
Dear. Chris, Ben.
Thanks for your reply.
As you know, booting time is important factor in embededd device.
If rootdelay is set to 5, kernel will be waiting for 5 sec. root_wait
is also looping per 100ms.
I have a question. Why is mmc using delayed workqueue ?
Thanks.
> 2011/3/30 Chris Ball <cjb@laptop.org>:
>> Hi,
>>
>> On Tue, Mar 29 2011, Ben Dooks wrote:
>>> On Wed, Mar 30, 2011 at 08:33:12AM +0900, NamJae Jeon wrote:
>>>> Hi. Chris.
>>>>
>>>> I found some problem in mmc driver. As you know, in nand trend, emmc
>>>> nand is used booting device in embededd product.
>>>
>>> yeah, a really nasty trend if you ask me.
>>>
>>>> It means that kernel, rootfs image is stored in emmc nand device. and
>>>> when rescaning mmc, mmc driver is working by delay work queue.
>>>>
>>>> It can be cause "can not mount rootfs". If kernel mounting is faster
>>>> than mmc rescan, this problem would occur..
>>>>
>>>> I changed to schedule_work instead of mmc_schedule_delayed_work. I can
>>>> make patch & test.
>>>>
>>>> could you tell me your opinion ?
>>>
>>> Use root_wait on the commandline and it will wait for the root device
>>> to become reayd.
>>
>> Ben's right that you should use "rootwait" (I don't think it works with
>> the underscore in the middle), rootdelay=5 if you want the boot to fail
>> if the partition isn't mounted after a little extra time, or an initrd
>> if you want full control over rootfs mounting.
>>
>> These parameters are documented in Documentation/kernel-parameters.txt.
>>
>> Thanks,
>>
>> - Chris.
>> --
>> Chris Ball <cjb@laptop.org> <http://printf.net/>
>> One Laptop Per Child
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About mmc delayed workqueue.
[not found] ` <AANLkTi=5R9w0k_Hg=htyDc=aQDA+t1HOLvWtfAOvMo+z@mail.gmail.com>
2011-03-30 0:40 ` NamJae Jeon
@ 2011-03-30 2:17 ` Chris Ball
2011-03-30 5:10 ` NamJae Jeon
1 sibling, 1 reply; 6+ messages in thread
From: Chris Ball @ 2011-03-30 2:17 UTC (permalink / raw)
To: NamJae Jeon, linux-mmc
Hi,
On Tue, Mar 29 2011, NamJae Jeon wrote:
> Dear. Chris, Ben.
>
> Thanks for your reply.
>
> As you know, booting time is important factor in embededd device.
>
> If rootdelay is set to 5, kernel will be waiting for 5 sec. root_wait
> is also looping per 100ms.
No. It will wait for *up to* five seconds, but it will actually
continue as soon as the device has enumerated. Same with rootwait,
of course.
MMC is by no means the only subsystem that behaves this way. If you
were using a USB or SATA/AHCI device, amongst many others, you would
have exactly the same problem.
You can see http://lwn.net/Articles/330378/ for some background reading.
> I have a question. Why is mmc using delayed workqueue ?
So that device enumeration can happen in the background, without
delaying the kernel boot while we wait for the controller to get all
the way to creating partitions.
If we didn't use a workqueue and you were working on an embedded project
that had an MMC slot that it *didn't* boot from, you'd be yelling at us
for instead wasting time holding up your non-mmc boot by not letting
userspace get going until we list MMC partitions. We can't win. :-)
In any case, I suspect that your system actually does boot faster than
it would if we didn't use a workqueue -- this way the delays in waiting
for the controller to come up are parallelized with other boot code.
That's good, right?
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About mmc delayed workqueue.
2011-03-30 2:17 ` Chris Ball
@ 2011-03-30 5:10 ` NamJae Jeon
0 siblings, 0 replies; 6+ messages in thread
From: NamJae Jeon @ 2011-03-30 5:10 UTC (permalink / raw)
To: Chris Ball, linux-mmc
Dear. Chris.
kernel is blocking during 5sec included mmc initializing by root_delay.
I think root_wait is better the solution than rootdelay.
Thanks for your advice.
2011/3/30 Chris Ball <cjb@laptop.org>:
> Hi,
>
> On Tue, Mar 29 2011, NamJae Jeon wrote:
>> Dear. Chris, Ben.
>>
>> Thanks for your reply.
>>
>> As you know, booting time is important factor in embededd device.
>>
>> If rootdelay is set to 5, kernel will be waiting for 5 sec. root_wait
>> is also looping per 100ms.
>
> No. It will wait for *up to* five seconds, but it will actually
> continue as soon as the device has enumerated. Same with rootwait,
> of course.
>
> MMC is by no means the only subsystem that behaves this way. If you
> were using a USB or SATA/AHCI device, amongst many others, you would
> have exactly the same problem.
>
> You can see http://lwn.net/Articles/330378/ for some background reading.
>
>> I have a question. Why is mmc using delayed workqueue ?
>
> So that device enumeration can happen in the background, without
> delaying the kernel boot while we wait for the controller to get all
> the way to creating partitions.
>
> If we didn't use a workqueue and you were working on an embedded project
> that had an MMC slot that it *didn't* boot from, you'd be yelling at us
> for instead wasting time holding up your non-mmc boot by not letting
> userspace get going until we list MMC partitions. We can't win. :-)
>
> In any case, I suspect that your system actually does boot faster than
> it would if we didn't use a workqueue -- this way the delays in waiting
> for the controller to come up are parallelized with other boot code.
> That's good, right?
>
> - Chris.
> --
> Chris Ball <cjb@laptop.org> <http://printf.net/>
> One Laptop Per Child
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-03-30 5:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 23:33 About mmc delayed workqueue NamJae Jeon
2011-03-29 23:34 ` Ben Dooks
2011-03-29 23:44 ` Chris Ball
[not found] ` <AANLkTi=5R9w0k_Hg=htyDc=aQDA+t1HOLvWtfAOvMo+z@mail.gmail.com>
2011-03-30 0:40 ` NamJae Jeon
2011-03-30 2:17 ` Chris Ball
2011-03-30 5:10 ` NamJae Jeon
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.