Force one processor with Linux - Questions

This is a discussion on Force one processor with Linux - Questions ; Hi On multi-processor LINUX machines, is there a way to force an executable run on only one processor ? (my application crashes on multi-processor or hyper-threaded architectures) PKD...

+ Reply to Thread
Results 1 to 19 of 19

Thread: Force one processor with Linux

  1. Force one processor with Linux

    Hi

    On multi-processor LINUX machines, is there a way
    to force an executable run on only one
    processor ?

    (my application crashes on multi-processor
    or hyper-threaded architectures)

    PKD


  2. Re: Force one processor with Linux

    Philip K. Dick wrote:
    > Hi
    >
    > On multi-processor LINUX machines, is there a way
    > to force an executable run on only one
    > processor ?
    >
    > (my application crashes on multi-processor
    > or hyper-threaded architectures)


    Your application will always run on only a single CPU unless it's a
    multi-threaded application.
    Binding an application to a single CPU is usually only done to have a
    positive effect on cache utilzation.

    If your application crashes on multi-CPU, you most likely have buggy
    hardware. There is no reason wny your application should have problems
    with migrating from one CPU to another.
    If it's really your application having problems with SMP, then your
    program is buggy and needs fixed. Find the root cause and fix that.

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


  3. Re: Force one processor with Linux

    Josef Moellers wrote:
    > Philip K. Dick wrote:
    >
    >> Hi
    >>
    >> On multi-processor LINUX machines, is there a way
    >> to force an executable run on only one
    >> processor ?
    >>
    >> (my application crashes on multi-processor
    >> or hyper-threaded architectures)

    >
    >
    > Your application will always run on only a single CPU unless it's a
    > multi-threaded application.
    > Binding an application to a single CPU is usually only done to have a
    > positive effect on cache utilzation.
    >
    > If your application crashes on multi-CPU, you most likely have buggy
    > hardware. There is no reason wny your application should have problems
    > with migrating from one CPU to another.
    > If it's really your application having problems with SMP, then your
    > program is buggy and needs fixed. Find the root cause and fix that.


    Thanks Josef

    My application is multi-threaded, but does not crash on
    Solaris multi-processor architectures.

    Unfortunately, there are parts of the code that I cannot
    change because it comes from other people (CORBA middleware)
    and it is very difficult to find the problem,
    that's why I asked if possible to force the application
    run on one processor


  4. Re: Force one processor with Linux

    "Philip K. Dick" wrote:
    >
    > (my application crashes on multi-processor
    > or hyper-threaded architectures)


    Then it is most likely going to crash on single
    CPU machines as well, maybe not as often.

    --
    Kasper Dupont
    Note to self: Don't try to allocate
    256000 pages with GFP_KERNEL on x86.

  5. Re: Force one processor with Linux

    In comp.os.linux.misc Philip K. Dick :
    > Josef Moellers wrote:
    >> Philip K. Dick wrote:
    >>
    >>> Hi
    >>>
    >>> On multi-processor LINUX machines, is there a way
    >>> to force an executable run on only one
    >>> processor ?

    [..]

    > My application is multi-threaded, but does not crash on
    > Solaris multi-processor architectures.


    > Unfortunately, there are parts of the code that I cannot
    > change because it comes from other people (CORBA middleware)
    > and it is very difficult to find the problem,
    > that's why I asked if possible to force the application
    > run on one processor


    man taskset

    (YMMV)

    --
    Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
    mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
    #bofh excuse 309: firewall needs cooling

  6. Re: Force one processor with Linux

    On Wed, 21 Dec 2005 10:30:42 +0100, Philip K. Dick wrote:

    > Hi
    >
    > On multi-processor LINUX machines, is there a way
    > to force an executable run on only one
    > processor ?
    >
    > (my application crashes on multi-processor
    > or hyper-threaded architectures)
    >
    > PKD


    Which kernel are you running?

  7. Re: Force one processor with Linux

    General Schvantzkoph wrote:
    > On Wed, 21 Dec 2005 10:30:42 +0100, Philip K. Dick wrote:
    >
    >
    >>Hi
    >>
    >>On multi-processor LINUX machines, is there a way
    >>to force an executable run on only one
    >>processor ?
    >>
    >>(my application crashes on multi-processor
    >>or hyper-threaded architectures)
    >>
    >>PKD

    >
    >
    > Which kernel are you running?



    I run on kernel 2.6, so that I can use
    'taskset' (package utils/schedutils)
    and my application crashes no more !

    MANY THANKS TO ALL !!!

    PKD


  8. Re: Force one processor with Linux

    Philip K. Dick wrote:
    > General Schvantzkoph wrote:
    >
    >>On Wed, 21 Dec 2005 10:30:42 +0100, Philip K. Dick wrote:
    >>
    >>
    >>
    >>>Hi
    >>>
    >>>On multi-processor LINUX machines, is there a way
    >>>to force an executable run on only one
    >>>processor ?
    >>>
    >>>(my application crashes on multi-processor
    >>>or hyper-threaded architectures)
    >>>
    >>>PKD

    >>
    >>
    >>Which kernel are you running?

    >
    >
    >
    > I run on kernel 2.6, so that I can use
    > 'taskset' (package utils/schedutils)
    > and my application crashes no more !


    I'd take that as a pretty clear sign that there's a bug in your code! I
    strongly encourage you to look into *why* you're getting crashes and fix
    it so that it works without the need for 'taskset'.

  9. Re: Force one processor with Linux

    On Wed, 21 Dec 2005 17:57:09 +0100, Philip K. Dick wrote:

    > General Schvantzkoph wrote:
    >> On Wed, 21 Dec 2005 10:30:42 +0100, Philip K. Dick wrote:
    >>
    >>
    >>>Hi
    >>>
    >>>On multi-processor LINUX machines, is there a way
    >>>to force an executable run on only one
    >>>processor ?
    >>>
    >>>(my application crashes on multi-processor
    >>>or hyper-threaded architectures)
    >>>
    >>>PKD

    >>
    >>
    >> Which kernel are you running?

    >
    >
    > I run on kernel 2.6, so that I can use
    > 'taskset' (package utils/schedutils)
    > and my application crashes no more !
    >
    > MANY THANKS TO ALL !!!
    >
    > PKD


    Which 2.6? There are huge differences between the different versions of
    2.6. If you are running an older version of the kernel try upgrading to
    the latest version, 2.6.14.4.

  10. Re: Force one processor with Linux


    "Philip K. Dick" wrote in message
    news:43A98965.9020805@tele2.fr...

    > I run on kernel 2.6, so that I can use
    > 'taskset' (package utils/schedutils)
    > and my application crashes no more !


    At least it crashes much less often. I caution you that you should *NOT*
    consider this code to be reliable.

    By the way, you may be able to get the same effect a less drastic way.
    Just make sure all your calls into the untrustworthy code come from a single
    thread. Basically, you wrap their code in a service thread that makes all
    the calls into it on your behalf. Think of it as a quarantine. If you can do
    this in a separate process, all the better!

    DS



  11. Re: Force one processor with Linux

    John-Paul Stewart wrote:
    > Philip K. Dick wrote:
    >
    >> General Schvantzkoph wrote:
    >>
    >>> On Wed, 21 Dec 2005 10:30:42 +0100, Philip K. Dick wrote:
    >>>
    >>>
    >>>
    >>>> Hi
    >>>>
    >>>> On multi-processor LINUX machines, is there a way
    >>>> to force an executable run on only one
    >>>> processor ?
    >>>>
    >>>> (my application crashes on multi-processor
    >>>> or hyper-threaded architectures)
    >>>>
    >>>> PKD
    >>>
    >>>
    >>>
    >>> Which kernel are you running?

    >>
    >>
    >>
    >>
    >> I run on kernel 2.6, so that I can use
    >> 'taskset' (package utils/schedutils)
    >> and my application crashes no more !

    >
    >
    > I'd take that as a pretty clear sign that there's a bug in your code! I
    > strongly encourage you to look into *why* you're getting crashes and fix
    > it so that it works without the need for 'taskset'.

    I'd take the crash as a sign that there is a bug. But if you take the
    fix as a sign that there is a bug, then whatever works for you...

  12. Re: Force one processor with Linux

    I really enjoyed your novel "UBIK".

    "Philip K. Dick" wrote in message
    news:43A920C2.1060103@tele2.fr...
    > Hi
    >
    > On multi-processor LINUX machines, is there a way
    > to force an executable run on only one
    > processor ?
    >
    > (my application crashes on multi-processor
    > or hyper-threaded architectures)
    >
    > PKD
    >




  13. Re: Force one processor with Linux

    George M. Reagan wrote:

    > I really enjoyed your novel "UBIK".


    Right, a From line indicating the name of a famous person is surely
    authenaticated proof of their identity.

    Not to mention Dick has been dead for over two decades.

    --
    Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
    San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
    Think twice before you speak to a friend in need.
    -- Ambrose Bierce

  14. Re: Force one processor with Linux

    linc wrote:
    > John-Paul Stewart wrote:
    >
    >>Philip K. Dick wrote:
    >>>
    >>>I run on kernel 2.6, so that I can use
    >>>'taskset' (package utils/schedutils)
    >>>and my application crashes no more !

    >>
    >>
    >>I'd take that as a pretty clear sign that there's a bug in your code! I
    >>strongly encourage you to look into *why* you're getting crashes and fix
    >>it so that it works without the need for 'taskset'.

    >
    > I'd take the crash as a sign that there is a bug. But if you take the
    > fix as a sign that there is a bug, then whatever works for you...


    Well, I said I take *that particular fix* as a sign that the bug is in
    *his* code. Sure, the crash itself is indeed a sign of a bug somewhere
    (potentially even in bad hardware). The fact that it now works on the
    exact same hardware with the exact same kernel and libraries strongly
    suggests the bug is in his code (which now appears unable to cope with
    being run on an SMP system) rather than anyplace else.

  15. Re: Force one processor with Linux

    You OBVIOUSLY cannot take a joke.

    "Erik Max Francis" wrote in message
    news:RpmdnSOfyaQxtjfeRVn-og@speakeasy.net...
    > George M. Reagan wrote:
    >
    >> I really enjoyed your novel "UBIK".

    >
    > Right, a From line indicating the name of a famous person is surely
    > authenaticated proof of their identity.
    >
    > Not to mention Dick has been dead for over two decades.
    >
    > --
    > Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
    > San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
    > Think twice before you speak to a friend in need.
    > -- Ambrose Bierce




  16. Re: Force one processor with Linux

    George M. Reagan wrote:

    > You OBVIOUSLY cannot take a joke.


    And you obviously don't realize that sarcasm doesn't come across well on
    Usenet.

    --
    Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
    San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
    Custom reconciles us to everything.
    -- Edmund Burke

  17. Re: Force one processor with Linux

    BLOW ME
    "Erik Max Francis" wrote in message
    news:l46dnSlCof3kzDbeRVn-oA@speakeasy.net...
    > George M. Reagan wrote:
    >
    >> You OBVIOUSLY cannot take a joke.

    >
    > And you obviously don't realize that sarcasm doesn't come across well on
    > Usenet.
    >
    > --
    > Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
    > San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
    > Custom reconciles us to everything.
    > -- Edmund Burke




  18. Re: Force one processor with Linux

    George M. Reagan wrote:

    > BLOW ME
    > "Erik Max Francis" wrote in message
    > news:l46dnSlCof3kzDbeRVn-oA@speakeasy.net...
    >> George M. Reagan wrote:
    >>
    >>> You OBVIOUSLY cannot take a joke.

    >>
    >> And you obviously don't realize that sarcasm doesn't come across well on
    >> Usenet.
    >>
    >> --
    >> Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
    >> San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
    >> Custom reconciles us to everything.
    >> -- Edmund Burke

    >
    >

    Tell us where to find you so we can place the C4.
    --
    JosephKK
    Gegen dummheit kampfen Die Gotter Selbst, vergebens.
    --Shiller

  19. Re: Force one processor with Linux

    Philip K. Dick wrote:

    > Hi
    >
    > On multi-processor LINUX machines, is there a way
    > to force an executable run on only one
    > processor ?
    >
    > (my application crashes on multi-processor
    > or hyper-threaded architectures)
    >
    > PKD


    Well, PKD, sorry to see that all you got for responses was some ridiculous
    back and forth about the novelist Philip K. Dick. Apparently they never
    heard of namespace clashes, but I digress.

    If you are using lilo, I believe you can pass the string smp=off to disable
    Symmetric Multi-Processing, and the kernel will then use only one
    processor. If you are having trouble making this work, let me know and I
    will look into it a bit better.

    If you are not using lilo as your bootloader, and you still need a solution,
    make sure to include the name of the bootloader you are using here.

    I just came on board here at comp.os.linux. I know the question is old, but
    I figured I'd reply anyway just in case you never received an answer.

    Cheers,

    Jim D.

+ Reply to Thread