Date: Fri, 29 Mar 2002 15:05:49 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: John Baldwin <jhb@FreeBSD.ORG> Cc: freebsd-smp@FreeBSD.ORG Subject: Re: RE: Syscall contention tests return, userret() bugs/issues. Message-ID: <200203292305.g2TN5nX75021@apollo.backplane.com> References: <XFMail.20020329171752.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
: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 <sys/queue.h> +#include <sys/vmmeter.h> #include <machine/pcpu.h> ... 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 <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ I've sent an email to Bruce. -Matt Matthew Dillon <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203292305.g2TN5nX75021>