ULE on current and CPU afinity.

From: Ian Freislich <if_at_hetzner.co.za>
Date: Thu, 04 Mar 2004 09:29:36 +0200
Hi

I thought I'd give ULE a spin again since according to Robert Watson
and David O'Brien's recents posts it appears that it might not to
pessimise my SMP buildworld.

I noticed this oddity:

dnetc in order to utilize both CPUs forks a child which also
processes.  SCHED_4BSD seems to be aware that the second CPU is
idle and the child or parent (don't really care which) migrates to
the second CPU so that all CPU time is occupied on both CPUs.

SCHED_ULE doesn't seem to migrate processes to an idle CPU and as
a result one CPU in my system is 100% idle.

last pid:   677;  load averages:  2.06,  1.69,  0.89    up 0+00:09:57  09:22:29
40 processes:  3 running, 37 sleeping
CPU states:  0.0% user, 50.0% nice,  0.4% system,  0.4% interrupt, 49.2% idle
Mem: 25M Active, 25M Inact, 22M Wired, 56K Cache, 28M Buf, 111M Free
Swap: 512M Total, 512M Free

  PID USERNAME  PRI NICE   SIZE    RES STATE  C   TIME   WCPU    CPU COMMAND
  624 ianf      139   20  1072K   884K RUN    0   4:00 48.44% 48.44% dnetc
  636 ianf      139   20  1072K   884K CPU0   0   3:26 48.44% 48.44% dnetc

Do processes have CPU afinity and is that afinity inherited by their
children?  Is this a wise thing to do since as demonstrated here
it is possible that all the CPU hogs may land up on 1 processor
thereby pessimising runtime?

Ian

--
Ian Freislich
Received on Wed Mar 03 2004 - 22:29:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:46 UTC