From owner-freebsd-smp Sat Aug 14 2:55:50 1999 Delivered-To: freebsd-smp@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id E79EF14DF7 for ; Sat, 14 Aug 1999 02:55:41 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 125FE1C1E for ; Sat, 14 Aug 1999 17:55:56 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.0.2 2/24/98 To: smp@freebsd.org Subject: simple affinity and pagezero etc. Date: Sat, 14 Aug 1999 17:55:56 +0800 From: Peter Wemm Message-Id: <19990814095556.125FE1C1E@overcee.netplex.com.au> Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org As part of the tinkering I've been doing with cpu_switch() etc, I decided to have another shot at John Dyson's idea of making the idle loop pagezero stuff into an idleprio kthread/process/whatever. Anyway, it seems to simplify things a lot, but it's caused a side effect I hadn't considered.. On this system I run the rc5des client, which rfork()'s into two threads at nice 19. These effectively block out the process entirely. On the system with these patches and soft affinity: last pid: 1380; load averages: 2.94, 2.96, 2.98 up 0+10:14:12 17:39:59 CPU states: 0.4% user, 99.2% nice, 0.0% system, 0.4% interrupt, 0.0% idle PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND 1158 peter 105 20 824K 452K RUN 1 60:33 97.95% 97.95% rc564 1157 peter 105 20 824K 452K CPU0 0 60:35 96.92% 96.92% rc564 1380 root 45 0 1560K 764K CPU1 0 0:00 2.31% 0.68% top 4 root 18 52 0K 0K RUN 1 0:03 0.00% 0.00% pgzero Anyway, the side effect that I hadn't considered was that the pgzero process sits in the run queue permanently and skews the load average up by one. ie: the load average is at 3 even though there are two running processes. On the other hand, it does simplify things a lot and I'm far more confident that it's "robust". I'm tempted to move it from max idprio priority to nice 19 so that it isn't starved for so long. I suspect it's probably a little better do occasionally do some pagezeroing if we've left it for a for long enough for the scheduler to raise it's priority enough to get a shot at the cpu for a moment. Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message