LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-15-2012, 05:58 AM   #1
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 294

Rep: Reputation: 32
OpenCL : re targeting execution instances from Device Queue to particular Core.


An OpenCL application submits work to the compute devices(CPU / GPU) via queues. In other word,these device queues keeps kernel execution instances and sends to device cores in pipeline.

What I want ?
I want to target this kernel execution instances to a particular core (Assuming that I have multiple cores for my CPU).

Can it be done in OpenCL using any API?

Let me know if I am confusing you.
Regards,
Barun
 
Old 06-16-2012, 02:10 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
Greetingz!

You should look into "CPU Affinity" if you're trying to get a process to run on a particular core.
 
Old 06-18-2012, 12:08 AM   #3
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 294

Original Poster
Rep: Reputation: 32
I think "cpu affinity" assigns a task to one or more cpu/processor. In other word it provides CPU level scheduling not core level scheduling.

But in my case I want so assign my task to some particular core of CPU (let's say I have a dual core CPU called CPU1 and I want to assign my task to core1 of CPU1), which can not be done using "cpu affinity".
Please correct me if I am wrong. As per man page of taskset:

NAME
taskset - retrieve or set a process's CPU affinity

SYNOPSIS
taskset [options] mask command [arg]...
taskset [options] -p [mask] pid

DESCRIPTION
taskset is used to set or retrieve the CPU affinity of a running process given its PID or to launch a new COMMAND with a given CPU affinity. CPU affinity is a scheduler property that "bonds" a process to a given set of CPUs on the system. For example,

0x00000001
is processor #0

0x00000003
is processors #0 and #1

0xFFFFFFFF
is all processors (#0 through #31)


I assume a processor is a CPU(multiple cores in it). But if processor is individual core, then we can use "taskset" for core level scheduling.
But in that case how I will know if which processor belongs to which core of which CPU ?



Is there any alternative mechanism available for this ?

Thanks for your informative response.

Last edited by barunparichha; 06-18-2012 at 12:21 AM.
 
Old 06-25-2012, 06:07 AM   #4
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
A "CPU" in this context is a logical CPU. Basically, just a single core.
 
Old 07-24-2012, 04:55 AM   #5
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 294

Original Poster
Rep: Reputation: 32
Can we split a task into multiple parts (like thread or work group) and target each of them to specified core.

In other words, can we bind a thread/subtask to a core.

Regs,
Barun
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 toAccess request queue of block device driver (e.g. sda) in my own kernel module nnilesh Linux - Kernel 0 04-03-2012 05:25 AM
sendmail-2: Wrong number of instances of process sendmail:, expected instances equal maxymaxymaxymaxymaxy Linux - Newbie 1 06-15-2011 10:51 AM
Any chance to get length of run queue and swap queue? emJ4y Programming 1 11-03-2010 02:13 PM
How to untar my tarred mail queue folder back to the sendmail queue directory again? Md.Abul Quashem Linux - Server 6 02-16-2010 08:32 AM
Is it possible for me to write in front of queue in case of message queue? hemanthv414 Linux - Newbie 1 11-17-2008 04:40 PM

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

All times are GMT -5. The time now is 02:25 PM.

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