Samsung / TizenRT

TizenRT is a lightweight RTOS-based platform to support low-end IoT devices
Apache License 2.0
566 stars 571 forks source link

os/arch/arm/src/armv7-a: Update hotplug logic for PM + SMP #6256

Closed edwakuwaku closed 1 month ago

edwakuwaku commented 3 months ago
edwakuwaku commented 3 months ago

Hi @ewoodev @kishore-sn @ritesh55555 , let's discuss about the PM + SMP sleep/wakeup operation in this PR.

edwakuwaku commented 3 months ago

Hello @kishore-sn @ewoodev @ritesh55555 , I have pushed the latest implementation. Instead of pause/resume, I changed to use gating as I think this method is not affecting the task/scheduler block. When I tested with pause/resume, there is some deadlock happening after secondary core is paused. Thus, I think there are still some misunderstanding from our side regarding the usage of cpu pause/resume. I tested this changes with both cores in idle thread, it works fine as previously. Please help to test this changes on the condition of "cpu0: idle thread, cpu1: not idle thread". The sleep should be aborted under this condition.

edwakuwaku commented 3 months ago

@ritesh55555 @kishore-sn , Could you please test with this PR on internal branch and leave the test results here? Thanks.

gSahitya-samsung commented 2 months ago

@edwakuwaku Please check merge conflicts

ritesh55555 commented 2 months ago

@ritesh55555 @kishore-sn , Could you please test with this PR on internal branch and leave the test results here? Thanks.

hi @edwakuwaku , Can you please rebase the PR, when i merge and test i am getting stuck just after booting several times. May be if you merge yourself and update, it would be better to test?

edwakuwaku commented 2 months ago

I have rebased to latest master.

ritesh55555 commented 2 months ago

This PR is working fine with product code. There is no more hang issue during sleep and wakeup. It is working fine

gSahitya-samsung commented 2 months ago

Can we keep SMP Hotplug logic outside pm_idle by creating new APIs ?

edwakuwaku commented 2 months ago

Can we keep SMP Hotplug logic outside pm_idle by creating new APIs ?

I have talked with @ritesh55555 about this, after this PR is merged, cleanup can be done from Samsung team on PM + SMP which you think it is necessary.