Re: [RFC PATCH] PM/CPU: Parallel enabling nonboot cpus with resume devices

From: Lan Tianyu
Date: Wed Jul 23 2014 - 05:51:41 EST


On 2014å07æ23æ 17:21, Peter Zijlstra wrote:
> On Wed, Jul 23, 2014 at 05:11:34PM +0800, Lan Tianyu wrote:
>> In the current world, all nonboot cpus are enabled serially during system
>> resume. System resume sequence is that boot cpu enables nonboot cpu one by
>> one and then resume devices. Before resuming devices, there are few tasks
>> assigned to nonboot cpus after they are brought up. This waste cpu usage.
>>
>> To accelerate S3, this patches adds a new kernel configure
>> PM_PARALLEL_CPU_UP_FOR_SUSPEND to allow boot cpu to go forward to resume
>> devices after bringing up one nonboot cpu. The nonboot cpu will be in charge
>> of bringing up other cpus. This makes enabling cpu2~x parallel with resuming
>> devices. From the test result on 4 logical core laptop, the time of resume
>> device almost wasn't affected by enabling nonboot cpus lately while the start
>> point is almost 30ms earlier than before.
>
> Why is this a CONFIG and why do we want to add more warts to the cpu
> hotplug instead of fixing it 'proper'?
>

Hi Peter:
Thank you for your review. Because I just tested this patch on x86
platform and didn't want to cause some regressions on the other
platforms. So I made it as a new CONFIG. In theory, this should not
cause some problems. If none objects, it can be the default behavior.

--
Best regards
Tianyu Lan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/