LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-06-2011, 04:33 PM   #1
neyshule
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Rep: Reputation: 0
HELP!!: CPU resource allocation between kernel modules and user mode process


Hi,all:
I run my program which consists of one kernel module and one user mode process on a dual core server. The problem here is the kernel module consumes 100% of one core while the user mode process only consumes 10% of the other core, is there any solution that I can assign some computing power from the user-mode core to the kernel-mode core, is there any allocation scheme? I knew linux seems to have some system call to allocate CPU upon different processes, but not kernel with module.
Thanks very much to reply.
 
Old 04-06-2011, 08:13 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,127

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
A kernel module that consumes an entire core sounds particularly poorly written. Best to fix that first.

And no, you can't allocate more than an entire core/CPU to any process if it is single-threaded. Again this is a (poor) code design issue.
 
Old 04-06-2011, 10:58 PM   #3
neyshule
LQ Newbie
 
Registered: Apr 2011
Posts: 11

Original Poster
Rep: Reputation: 0
Ok, my bad, actually this program has a pid, while it's running, using top I can see it consume one core 100% usage. so how can I let it use the other core?
 
Old 04-08-2011, 04:18 AM   #4
Nermal
Member
 
Registered: Jan 2009
Distribution: Debian
Posts: 59
Blog Entries: 2

Rep: Reputation: 6
Threads are your friend here.

what is your code written in? I may be able to offer assistance.
 
Old 04-08-2011, 02:29 PM   #5
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
The question isn't how can you let the thread use other core if you only have single. The question is why your kernel module consume 100% one core power. Does kernel module have dead loop or handle too many thing?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to assign CPU resource to a certain process(RHEL 5.5 client with workstation) elelab Linux - Newbie 3 07-01-2010 11:02 AM
What is user mode jiffies and kernel mode jiffies of a process iamjayanth Linux - Software 2 09-14-2009 11:35 PM
Getting some process information in user mode devnux Programming 1 06-08-2008 03:31 PM
Performance and resource allocation on MEPIS Landshark Linux - Hardware 1 04-17-2007 12:41 AM
Limit CPU by user, site or process apc1 Linux - General 0 01-22-2005 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration