From owner-freebsd-smp Fri Mar 29 15: 5:55 2002 Delivered-To: freebsd-smp@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 390F637B405; Fri, 29 Mar 2002 15:05:49 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g2TN5nX75021; Fri, 29 Mar 2002 15:05:49 -0800 (PST) (envelope-from dillon) Date: Fri, 29 Mar 2002 15:05:49 -0800 (PST) From: Matthew Dillon Message-Id: <200203292305.g2TN5nX75021@apollo.backplane.com> To: John Baldwin Cc: freebsd-smp@FreeBSD.ORG Subject: Re: RE: Syscall contention tests return, userret() bugs/issues. References: Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org :Hmm, I'm not sure of the best way of handling this stat then. ++*PCPU_PTR() :might actually be ok at least for all of our current archs. (If you migrate :the update the counter of another CPU but that would be rare.) I think the easiest thing to do is to create a macro in the MI pcpu.h: PCPU_LAZY_COUNTER(cnt.v_syscall, 1); Which would just do this for now: *PCPU_PTR(arg) += count; With a big fat XXX comment describing the situation, allowing us to fix it later. I was able to embed struct vmmeter into sys/pcpu.h trivially. sys/vmmeter.h is a low level include that does not depend on much of anything, so it simply worked to do this: Index: sys/pcpu.h ... #ifdef _KERNEL #include +#include #include ... PCPU_MD_FIELDS; + struct vmmeter pc_cnt; /* VM stats counters */ }; I'm going to let this thread sit over the weekend to allow other people to chime in in regards to moving struct vmmeter into a per-cpu area. I think I've made a good case for it based on the cache contention between cpu's. If no major problems crop up by monday I'll start with the syscall counter and then start moving all the 'cnt.*' counter code to use the per-cpu area instead. :> (matt) :> This looks like a good area of work. If nobody has code worked up :> for it I can research the issue more, add the flag, and shift things :> into ast(). (After I finish the stage-2 cpu_critical*() stuff which :> re-inlines cpu_critical_enter() and cpu_critical_exit(), which I've :> been talking to Jake about). : : (john) : :Sure, Bruce already has some patches for this stuff so you might ask him about :it. Jake might also have some ideas on the topic, but sounds good to me. : :-- : :John Baldwin <>< http://www.FreeBSD.org/~jhb/ I've sent an email to Bruce. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message