hw_breakpoint.c :cpu hotplug handling
EP-2DAD0AFA905A4ACB804C4F82A001242F
Quoted 4 lines · Maninder Singh
Quoted 4 lines
EP-2DAD0AFA905A4ACB804C4F82A001242F
Subject: [PATCH 1/1]
hw_breakpoint.c:cpu hotplug handling
Quoted 8 lines
Quoted 2 lines
This patch adds support for CPU hotplug, It re-installl all installed watchpoints and breakpoints back on H/W in case of cpu-hot plug.
Not sure why this is needed -- the scheduler should reinstall the breakpoints when the debugged task gets scheduled in via
arch_install_hw_breakpoint.Will
I agree with you this reinstalling has to be either take care by scheduler or Debug tool.
In current implementation we clear H/W registers but we don't clear slots (wp_on_reg / bp_on_reg) for both watchpoint or breakpoint. So it makes mandatory for debug tool to uninstall breakpoints when CPU goes offline, because if we don't
uninstall which I think is not required and when CPU comes online, we will not be able to reinstall them back because there will be no free slots. Despite of the fact that H/W registers are free but still we wouldn't be able to install breakpoints.
Logically we should clear these slots or we should reinstall but if you think reinstall has to be taken care by scheduler or debugger then at least we should clear these slots.
Regards,
Vaneet Narang ÿôèº{.nÇ+‰·Ÿ®‰†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºÊ‡Ú™ë,j¢f£¢·hš�ï�êÿ‘êçz_è®(階ŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨èÚ&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿÃÿ¶ìÿ¢¸?–I¥
Quoted 10 lines · Vaneet Narang
EP-2DAD0AFA905A4ACB804C4F82A001242F
Quoted 6 lines · Maninder Singh
Quoted 6 lines
EP-2DAD0AFA905A4ACB804C4F82A001242F
Subject: [PATCH 1/1]
hw_breakpoint.c:cpu hotplug handlingThis patch adds support for CPU hotplug, It re-installl all installed watchpoints and breakpoints back on H/W in case of cpu-hot plug.
Quoted 8 lines
Quoted 5 lines
Not sure why this is needed -- the scheduler should reinstall the breakpoints when the debugged task gets scheduled in via
arch_install_hw_breakpoint.Will
I agree with you this reinstalling has to be either take care by scheduler or Debug tool.
Which debug tool? If it's a ptrace user, then the scheduler should still manage this, as ptrace will call into perf to create the breakpoints.
Quoted 2 lines
In current implementation we clear H/W registers but we don't clear slots (
wp_on_reg/bp_on_reg) for both watchpoint or breakpoint.
Ok, so are you saying that when the CPU is hotplugged off, the active breakpoints aren't being uninstalled by perf? I thought this would have happened as a result of the scheduler migrating the current task away from the dying CPU.
Will