Re: How to write a kernel patch to expose a kernel-level function?
- From: "iforone" <floydstestemail@xxxxxxxxx>
- Date: 31 Jan 2006 12:32:26 -0800
Jean-David Beyer wrote:
> Peter T. Breuer wrote:
> > John Hasler <john@xxxxxxxxxx> wrote:
> >> hzmonte writes:
> >>> What I want, and what smp_processor_id() returns, is which logical
> >>> processor the calling thread is running on. Is CPU0, CPU1, or CPU2, for
> >>> example?
> >
> >> Why? Of what possible use could that information be? What problem are you
> >> trying to solve?
> >
> > Dunno. Probably some mistaken idea. But anyway it would be simple to do
> > - some ioctl which returns what he wants. But doesn't he have the info
> > in proc anyway?
> >
> How would that do any good? When the process makes the kernel call on ioctl,
> a process switch will occur and what would the ioctl return? The
> processor-id that the process _used to_ run on, not the one it will run on
> once the ioctl returns.
>
> He is doomed. The only way I can think of that will work is to examine the
> code of the kernel in the area where process switching occurs. I looked in
> there a while ago, and it really tries to return a process to the same
> processor it ran on before to try to maintain a high cache hit ratio, but
> with the puny caches on my processors (1 Megabit L3 caches) compared to
> process sizes (50Megabytes and up for some of the large ones), this may be
> of only minor importance.
>
> It depends on the working set size of all the processes currently running. I
> have a dbms that runs many processes, and does a lot of IO. Runs pretty well
> unless I let BOINC run 4 compute-limited processes at nice 19. Running BOINC
> this way should take up all the otherwise unused CPU cycles and not
> interfere with the higher priority processes, but it spoils the database
> application(s). They try to do a disk write and suspend. Then a BOINC
> process runs and dirtys up the caches, so when the IO for the dbms completes
> and the dbms process resumes, the cache is completely dirty so it runs at
> RAM speeds (533MHz) instead of processor speeds (3.06GHz).
Isn't some of this info the OP desires (considering HT, and/or Dual
Core CPUs) highly dependent upon "which" brand (Intel or AMD64) the OP
is using ??
I'm not up on this at all - and I don't yet have a great grasp on
explaining the technology and functions , but doesn't AMD64 incorporate
_NUMA_, the HTT Bus, and the A64 Memory Controller is OnDie, ["MOESI
protocol" (Modified, Owned, Exclusive, Shared, Invalid)] since their ,
as oppposed to the Intel Architecture (Xeon, Pentium-D, and HT -- I'm
don't know about Itanium though).
<http://en.wikipedia.org/wiki/Non-Uniform_Memory_Access>
more info about the diffs;
<http://www.xbitlabs.com/articles/cpu/print/dual-core.html>
hmmm..wonder how MShafts PAE crap figures into all this too ?
.
- References:
- How to write a kernel patch to expose a kernel-level function?
- From: hzmonte
- Re: How to write a kernel patch to expose a kernel-level function?
- From: Tauno Voipio
- Re: How to write a kernel patch to expose a kernel-level function?
- From: hzmonte
- Re: How to write a kernel patch to expose a kernel-level function?
- From: John Hasler
- Re: How to write a kernel patch to expose a kernel-level function?
- From: Peter T. Breuer
- Re: How to write a kernel patch to expose a kernel-level function?
- From: Jean-David Beyer
- How to write a kernel patch to expose a kernel-level function?
- Prev by Date: Help Verify Runlevel 1 Multi-Process Capability
- Next by Date: exclude a directory with tar
- Previous by thread: Re: How to write a kernel patch to expose a kernel-level function?
- Next by thread: Re: How to write a kernel patch to expose a kernel-level function?
- Index(es):
Relevant Pages
|