<br><br>
<div class="gmail_quote">On Mon, Aug 22, 2011 at 10:11 PM, Vladimir Murzin <span dir="ltr"><<a href="mailto:murzin.v@gmail.com">murzin.v@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>
<div></div>
<div class="h5">On Tue, Aug 23, 2011 at 2:15 AM, Vaibhav Jain <<a href="mailto:vjoss197@gmail.com">vjoss197@gmail.com</a>> wrote:<br>> Hi,<br>> Thanks for replying but I want to do this in a SMP machine.<br>> Please help!<br>
><br>> Thanks<br>> Vaibhav Jain<br>><br>> On Wed, Aug 17, 2011 at 10:53 PM, Vladimir Murzin <<a href="mailto:murzin.v@gmail.com">murzin.v@gmail.com</a>><br>> wrote:<br>>><br>>> On Wed, Aug 17, 2011 at 11:01 PM, Vaibhav Jain <<a href="mailto:vjoss197@gmail.com">vjoss197@gmail.com</a>> wrote:<br>
>> > Hi,<br>>> ><br>>> > I am looking into running a program on one of the cores which is<br>>> > isolated<br>>> > (logically offline )<br>>> > from the rest of the cores. I have come to that the command<br>
>> > echo 0 > /sys/device/system/cpu/<core num>/online<br>>> ><br>>> > will make a core logically offline,<br>>> > What I need to do now is to run a program on this offline core. Please<br>
>> > suggest on how to proceed.<br>>> ><br>>> > Thanks!<br>>> > Vaibhav Jain<br>>> > _______________________________________________<br>>> > Kernelnewbies mailing list<br>
>> > <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>>> > <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
>> ><br>>> ><br>>> Hi Vaibhav,<br>>><br>>> I think it's impossible to run out a process on unplugged CPU. May be<br>>> AMP[1] is what you need, but it's a bit different approach.<br>
>><br>>> [1]<a href="http://en.wikipedia.org/wiki/Asymmetric_multiprocessing" target="_blank">http://en.wikipedia.org/wiki/Asymmetric_multiprocessing</a><br>><br>><br><br></div></div>Hi Vaibhav,<br><br>There is one more approach, but it's not operate on off-lined CPU.<br>
Have a look at isolcpu kernel boot option.<br>Description in Documentation/kernel-parameters.txt says:<br><br>This option can be used to specify one or more CPUs to isolate from<br>the general SMP balancing and scheduling algorithms. You can move a<br>
process onto or off an "isolated" CPU via the CPU affinity syscalls or<br>cpuset. <cpu number> begins at 0 and the maximum value is "number of<br>CPUs in system - 1". This option is the preferred way to isolate CPUs.<br>
The alternative -- manually setting the CPU mask of all tasks in the<br>system -- can cause problems and suboptimal load balancer performance.<br></blockquote></div>
<div><br> </div>
<div> </div>
<div>Hi,</div>
<div> </div>
<div>Thanks again! But I am asked to look into running process only when the cpu has been logically offlined.</div>
<div>Someone suggested that I should make changes to arch/x_86/kernel/smpboot.c file in one of the play_dead functions. But I don't know</div>
<div>what these function is doing and what changes should I make. Could you please give me some idea ?</div>
<div> </div>
<div> </div>
<div>Thanks</div>
<div>Vaibhav Jain</div>