Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on AMD64
  • Search

How do I allow a chroot to use only 1 processor?

Have an x86-64 problem? Post here.
Locked
Advanced search
9 posts • Page 1 of 1
Author
Message
Eidi
Tux's lil' helper
Tux's lil' helper
Posts: 82
Joined: Thu Sep 02, 2004 2:08 am
Location: Arizona
Contact:
Contact Eidi
Website

How do I allow a chroot to use only 1 processor?

  • Quote

Post by Eidi » Sat Mar 18, 2006 9:34 pm

I'm really not sure how to ask this, or even if I'm saying it right, but I have an Athlon 64 X2, and I'm wondering if I can set up a chroot to use only 1 of the 2 processors in it.

The reason being is that a game I play has issues with a multiple processor system, which I can run fine under Cedega. And I was just thinking about how to make it only use 1 processor... So, yeah.

This is probably an odd request, purposefully gimping your system, but I'm wondering if it can be done while the main install is able to use both cores.

Thanks in advance for any help.
Top
Aries-Belgium
l33t
l33t
User avatar
Posts: 730
Joined: Fri Jul 08, 2005 12:38 pm
Location: Willebroek, Belgium

  • Quote

Post by Aries-Belgium » Sat Mar 18, 2006 11:21 pm

It's a long shot, but you could disable smp in the kernel of the chroot ...
I think the second core isn't recognized then, but I'm not sure ...
Ep2.nl | Developers Community
Top
Eidi
Tux's lil' helper
Tux's lil' helper
Posts: 82
Joined: Thu Sep 02, 2004 2:08 am
Location: Arizona
Contact:
Contact Eidi
Website

  • Quote

Post by Eidi » Sun Mar 19, 2006 3:12 am

I think the chroot uses your currently running kernel, I don't think it has a kernel all for itself.

I know virtual machines like VMWare and Xen uses a new kernel for each machine, I may have to do that if it's unable to be done via a chroot... But can they make use of NVidia 3D acceleration?

I could be wrong, but I don't think a new kernel is used for a chroot.
Top
Aries-Belgium
l33t
l33t
User avatar
Posts: 730
Joined: Fri Jul 08, 2005 12:38 pm
Location: Willebroek, Belgium

  • Quote

Post by Aries-Belgium » Sun Mar 19, 2006 3:43 am

Yeah, you're right.

Can I ask, why exactly you need a chroot to play a game?

Vmware uses a virtual vmware adapater, so I don't know it has opengl support and stuff ...
Ep2.nl | Developers Community
Top
alistair
Retired Dev
Retired Dev
User avatar
Posts: 869
Joined: Fri Jul 15, 2005 12:53 am

  • Quote

Post by alistair » Sun Mar 19, 2006 3:48 am

I have no experience with this but couldn't you set the processor affinity at runtime or before.

So if the exe is located in the chroot then you set a processor. This is the hard bit as I dont know if you can find out where a processes exe is located (especially with respect to the the real /)
______________
Help the gentoo-java project. Visit Gentoo Java Project

what good are admin powers if you don't abuse them for personal gain - mark_alec
Top
Eidi
Tux's lil' helper
Tux's lil' helper
Posts: 82
Joined: Thu Sep 02, 2004 2:08 am
Location: Arizona
Contact:
Contact Eidi
Website

  • Quote

Post by Eidi » Sun Mar 19, 2006 4:32 am

I might try VMWare if it supports that, but I honestly have no clue.

If I started Cedega with a processor affinity at runtime, would any child processes also have that processor affinity? It might work that way. I dunno how to do a processor affinity though.

I dunno if I need a chroot or not, I was just thinking it might be better to play games in 32-bit mode instead of 64, but I dunno if that'll change anything or not, honestly.
Top
niallm
n00b
n00b
Posts: 3
Joined: Mon Jul 05, 2004 9:52 am

  • Quote

Post by niallm » Mon Mar 20, 2006 5:07 pm

You can specify how many processors you want each virtual machine to have with Xen so this might be of some use to you. Might be hard to get the direct hardware acceleration for the nvidia card working with xen.

Dont think VMware would work well for this at all if the game needs 3d acceleration as last time I looked anyway vmware just presents the card as a standard VGA card.
Top
tcfelker
n00b
n00b
Posts: 46
Joined: Tue Jun 24, 2003 1:55 am

  • Quote

Post by tcfelker » Tue Mar 21, 2006 12:16 am

Code: Select all

emerge schedtool

schedtool -a 1 -e command
Anything you put for command, and all of its children, will be forced to run on the first CPU. Use -a 2 to force to the second CPU or -a 3 to force for both (it's a bitmask). The game may still detect the system as SMP, but if the problems simply come from race conditions exacerbated by having multiple CPUs, this should help.

Don't waste your time with the kernel inside the chroot, that will have no effect, as processes inside the chroot are still using the same kernel as outside.
Top
Eidi
Tux's lil' helper
Tux's lil' helper
Posts: 82
Joined: Thu Sep 02, 2004 2:08 am
Location: Arizona
Contact:
Contact Eidi
Website

  • Quote

Post by Eidi » Tue Mar 21, 2006 8:32 pm

Ah, thank you very much. Seems like it works, woot!

Thanks again!
Top
Locked

9 posts • Page 1 of 1

Return to “Gentoo on AMD64”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic