All of lore.kernel.org
 help / color / mirror / Atom feed
* Running code on an isolated core
@ 2011-08-17 19:01 Vaibhav Jain
  2011-08-18  5:53 ` Vladimir Murzin
  0 siblings, 1 reply; 6+ messages in thread
From: Vaibhav Jain @ 2011-08-17 19:01 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I am looking into running a program on one of the cores which is isolated
(logically offline )
from the rest of the cores. I have come to that the command
echo 0 > /sys/device/system/cpu/<core num>/online

will make a core logically offline,
What I need to do now is to run a program on this offline core. Please
suggest on how to proceed.

Thanks!
Vaibhav Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110817/652e4e7d/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Running code on an isolated core
  2011-08-17 19:01 Running code on an isolated core Vaibhav Jain
@ 2011-08-18  5:53 ` Vladimir Murzin
  2011-08-22 22:15   ` Vaibhav Jain
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Murzin @ 2011-08-18  5:53 UTC (permalink / raw)
  To: kernelnewbies

On Wed, Aug 17, 2011 at 11:01 PM, Vaibhav Jain <vjoss197@gmail.com> wrote:
> Hi,
>
> I am looking into running a program on one of the cores which is isolated
> (logically offline )
> from the rest of the cores. I have come to that the command
> echo 0 > /sys/device/system/cpu/<core num>/online
>
> will make a core logically offline,
> What I need to do now is to run a program on this offline core. Please
> suggest on how to proceed.
>
> Thanks!
> Vaibhav Jain
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
Hi Vaibhav,

I think it's impossible to run out a process on unplugged CPU. May be
AMP[1] is what you need, but it's a bit different approach.

[1]http://en.wikipedia.org/wiki/Asymmetric_multiprocessing

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Running code on an isolated core
  2011-08-18  5:53 ` Vladimir Murzin
@ 2011-08-22 22:15   ` Vaibhav Jain
  2011-08-23  5:11     ` Vladimir Murzin
  0 siblings, 1 reply; 6+ messages in thread
From: Vaibhav Jain @ 2011-08-22 22:15 UTC (permalink / raw)
  To: kernelnewbies

Hi,
Thanks for replying but I want to do this in a SMP machine.
Please help!

Thanks
Vaibhav Jain

On Wed, Aug 17, 2011 at 10:53 PM, Vladimir Murzin <murzin.v@gmail.com>wrote:

>  On Wed, Aug 17, 2011 at 11:01 PM, Vaibhav Jain <vjoss197@gmail.com>
> wrote:
> > Hi,
> >
> > I am looking into running a program on one of the cores which is isolated
> > (logically offline )
> > from the rest of the cores. I have come to that the command
> > echo 0 > /sys/device/system/cpu/<core num>/online
> >
> > will make a core logically offline,
> > What I need to do now is to run a program on this offline core. Please
> > suggest on how to proceed.
> >
> > Thanks!
> > Vaibhav Jain
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
> >
> Hi Vaibhav,
>
> I think it's impossible to run out a process on unplugged CPU. May be
> AMP[1] is what you need, but it's a bit different approach.
>
> [1]http://en.wikipedia.org/wiki/Asymmetric_multiprocessing
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110822/59083fda/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Running code on an isolated core
  2011-08-22 22:15   ` Vaibhav Jain
@ 2011-08-23  5:11     ` Vladimir Murzin
  2011-08-23  5:58       ` Vaibhav Jain
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Murzin @ 2011-08-23  5:11 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Aug 23, 2011 at 2:15 AM, Vaibhav Jain <vjoss197@gmail.com> wrote:
> Hi,
> Thanks for replying but I want to do this in a SMP machine.
> Please help!
>
> Thanks
> Vaibhav Jain
>
> On Wed, Aug 17, 2011 at 10:53 PM, Vladimir Murzin <murzin.v@gmail.com>
> wrote:
>>
>> On Wed, Aug 17, 2011 at 11:01 PM, Vaibhav Jain <vjoss197@gmail.com> wrote:
>> > Hi,
>> >
>> > I am looking into running a program on one of the cores which is
>> > isolated
>> > (logically offline )
>> > from the rest of the cores. I have come to that the command
>> > echo 0 > /sys/device/system/cpu/<core num>/online
>> >
>> > will make a core logically offline,
>> > What I need to do now is to run a program on this offline core. Please
>> > suggest on how to proceed.
>> >
>> > Thanks!
>> > Vaibhav Jain
>> > _______________________________________________
>> > Kernelnewbies mailing list
>> > Kernelnewbies at kernelnewbies.org
>> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>> >
>> >
>> Hi Vaibhav,
>>
>> I think it's impossible to run out a process on unplugged CPU. May be
>> AMP[1] is what you need, but it's a bit different approach.
>>
>> [1]http://en.wikipedia.org/wiki/Asymmetric_multiprocessing
>
>

Hi Vaibhav,

There is one more approach, but it's not operate on off-lined CPU.
Have a look at isolcpu kernel boot option.
Description in Documentation/kernel-parameters.txt says:

This option can be used to specify one or more CPUs to isolate from
the general SMP balancing and scheduling algorithms. You can move a
process onto or off an "isolated" CPU via the CPU affinity syscalls or
cpuset. <cpu number> begins at 0 and the maximum value is "number of
CPUs in system - 1". This option is the preferred way to isolate CPUs.
The alternative -- manually setting the CPU mask of all tasks in the
system -- can cause problems and suboptimal load balancer performance.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Running code on an isolated core
  2011-08-23  5:11     ` Vladimir Murzin
@ 2011-08-23  5:58       ` Vaibhav Jain
  2011-08-23  7:09         ` Vladimir Murzin
  0 siblings, 1 reply; 6+ messages in thread
From: Vaibhav Jain @ 2011-08-23  5:58 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Aug 22, 2011 at 10:11 PM, Vladimir Murzin <murzin.v@gmail.com>wrote:

>  On Tue, Aug 23, 2011 at 2:15 AM, Vaibhav Jain <vjoss197@gmail.com> wrote:
> > Hi,
> > Thanks for replying but I want to do this in a SMP machine.
> > Please help!
> >
> > Thanks
> > Vaibhav Jain
> >
> > On Wed, Aug 17, 2011 at 10:53 PM, Vladimir Murzin <murzin.v@gmail.com>
> > wrote:
> >>
> >> On Wed, Aug 17, 2011 at 11:01 PM, Vaibhav Jain <vjoss197@gmail.com>
> wrote:
> >> > Hi,
> >> >
> >> > I am looking into running a program on one of the cores which is
> >> > isolated
> >> > (logically offline )
> >> > from the rest of the cores. I have come to that the command
> >> > echo 0 > /sys/device/system/cpu/<core num>/online
> >> >
> >> > will make a core logically offline,
> >> > What I need to do now is to run a program on this offline core. Please
> >> > suggest on how to proceed.
> >> >
> >> > Thanks!
> >> > Vaibhav Jain
> >> > _______________________________________________
> >> > Kernelnewbies mailing list
> >> > Kernelnewbies at kernelnewbies.org
> >> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >> >
> >> >
> >> Hi Vaibhav,
> >>
> >> I think it's impossible to run out a process on unplugged CPU. May be
> >> AMP[1] is what you need, but it's a bit different approach.
> >>
> >> [1]http://en.wikipedia.org/wiki/Asymmetric_multiprocessing
> >
> >
>
> Hi Vaibhav,
>
> There is one more approach, but it's not operate on off-lined CPU.
> Have a look at isolcpu kernel boot option.
> Description in Documentation/kernel-parameters.txt says:
>
> This option can be used to specify one or more CPUs to isolate from
> the general SMP balancing and scheduling algorithms. You can move a
> process onto or off an "isolated" CPU via the CPU affinity syscalls or
> cpuset. <cpu number> begins at 0 and the maximum value is "number of
> CPUs in system - 1". This option is the preferred way to isolate CPUs.
> The alternative -- manually setting the CPU mask of all tasks in the
> system -- can cause problems and suboptimal load balancer performance.
>



Hi,

Thanks again! But I am asked to look into running process only when the cpu
has been logically offlined.
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
what these function is doing and what changes should I make. Could you
please give me some idea ?


Thanks
Vaibhav Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110822/aa71760d/attachment-0001.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Running code on an isolated core
  2011-08-23  5:58       ` Vaibhav Jain
@ 2011-08-23  7:09         ` Vladimir Murzin
  0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Murzin @ 2011-08-23  7:09 UTC (permalink / raw)
  To: kernelnewbies

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

Good luck with that!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-23  7:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-17 19:01 Running code on an isolated core Vaibhav Jain
2011-08-18  5:53 ` Vladimir Murzin
2011-08-22 22:15   ` Vaibhav Jain
2011-08-23  5:11     ` Vladimir Murzin
2011-08-23  5:58       ` Vaibhav Jain
2011-08-23  7:09         ` Vladimir Murzin

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.