From owner-freebsd-smp Tue Mar 5 13:25:34 2002 Delivered-To: freebsd-smp@freebsd.org Received: from smtp.whitebarn.com (Spin.whitebarn.com [216.0.13.113]) by hub.freebsd.org (Postfix) with ESMTP id CA86A37B400 for ; Tue, 5 Mar 2002 13:25:26 -0800 (PST) Received: from Talarian.Com (Chin.whitebarn.com [216.0.13.79]) by smtp.whitebarn.com (8.9.3/8.9.3) with ESMTP id PAA13416; Tue, 5 Mar 2002 15:25:25 -0600 (CST) (envelope-from Bob@Talarian.Com) Message-ID: <3C851ED1.4080703@Talarian.Com> Date: Tue, 05 Mar 2002 13:38:57 -0600 From: Bob Van Valzah User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: SMP@FreeBSD.Org Subject: -CURRENT and -STABLE Cross Booting? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 [This isn't really an SMP question, but it is germane to the SMP testing that I'm doing. I'm not clued into the booting differences between -CURRENT and -STABLE, so I'd appreciate any pointers you might have.] I hope to automate as much of the testing as possible. Ideally, I'd even like to automate the booting of one machine into either the -CURRENT or -STABLE branches. I have different disks and different slices for each branch. Of course, I'd also like to be able to boot different kernels within a branch so that the effect of WITNESS and other options can be quantified and tracked over time. I'm confident that I can figure out how to automatically futz /boot/loader.conf to load different kernels within a branch. (Are there any issues introduced by running from a kernel other than /kernel or /boot/kernel/kernel?) But I'm not aware of any way to script input to boot0. Hence booting one branch or the other currently requires a console key press and so can't be automated. Is it possible to use /boot/loader from one branch to load a kernel from a different branch on a different disk or slice? If so, what're the issues involved in this. Thanks, Bob To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Mar 5 17:31:40 2002 Delivered-To: freebsd-smp@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id 660B837B416 for ; Tue, 5 Mar 2002 17:31:36 -0800 (PST) Received: from srs.cs.rpi.edu (srs.cs.rpi.edu [128.213.12.66]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id UAA08700 for ; Tue, 5 Mar 2002 20:31:35 -0500 (EST) Message-Id: <200203060131.UAA08700@cs.rpi.edu> To: freebsd-smp@freebsd.org Subject: SMP Implimentation Question Date: Tue, 05 Mar 2002 20:31:35 -0500 From: "David E. Cross" 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 I have been looking at the -current SMP method and I have a question about the implimentation (more specifically why my idea wouldn't work, or would be "bad"). My idea would be to use the MMU to enforce the use of mutex-es. My idea goes as follows. The "problem" with SMP are 2 people modifying "data" at the same time, or modifying when someone else is looking at it. There are 2 primary places to store data in memory, the stack, and not the stack. The stack, by definition, is a single instance. So, start the kernel with all of the memory "protected" (read or write generates a fault). Then as a thread needs to access memory it requests it to be unlocked for shared (read only) or exclusive (r/w) access at address "X" for "Y" bytes. The stack segment for the current thread is automatically unlocked. Any code that doesn't follow these locking semantics would generate an immediate fault at the point of failure making it trivial to identify the offending line of code. This would also allow parallel use of varies data structures. For example 2 UFS operations on different partitions would not lock each other out since they would be operating of different portions of the structure in memory. -- David Cross | email: crossd@cs.rpi.edu Lab Director | Rm: 308 Lally Hall Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Mar 5 21: 9:23 2002 Delivered-To: freebsd-smp@freebsd.org Received: from tp.databus.com (p72-186.acedsl.com [66.114.72.186]) by hub.freebsd.org (Postfix) with ESMTP id 9EE8837B400 for ; Tue, 5 Mar 2002 21:09:21 -0800 (PST) Received: (from barney@localhost) by tp.databus.com (8.11.6/8.11.4) id g2658vh18287; Wed, 6 Mar 2002 00:08:57 -0500 (EST) (envelope-from barney) Date: Wed, 6 Mar 2002 00:08:57 -0500 From: Barney Wolff To: Bob Van Valzah Cc: SMP@FreeBSD.ORG Subject: Re: -CURRENT and -STABLE Cross Booting? Message-ID: <20020306000857.A18255@tp.databus.com> References: <3C851ED1.4080703@Talarian.Com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3C851ED1.4080703@Talarian.Com>; from Bob@Talarian.Com on Tue, Mar 05, 2002 at 01:38:57PM -0600 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 Set your target machine for serial console, and use Expect from your test control machine. Barney Wolff On Tue, Mar 05, 2002 at 01:38:57PM -0600, Bob Van Valzah wrote: > > But I'm not aware of any way to script input to boot0. Hence booting one > branch or the other currently requires a console key press and so can't > be automated. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Mar 5 21:34:31 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 668FF37B400 for ; Tue, 5 Mar 2002 21:34:28 -0800 (PST) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g265YQcR032934; Wed, 6 Mar 2002 00:34:26 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20020306000857.A18255@tp.databus.com> References: <3C851ED1.4080703@Talarian.Com> <20020306000857.A18255@tp.databus.com> Date: Wed, 6 Mar 2002 00:34:25 -0500 To: Barney Wolff , Bob Van Valzah From: Garance A Drosihn Subject: Re: -CURRENT and -STABLE Cross Booting? Cc: SMP@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) 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 >On Tue, Mar 05, 2002 at 01:38:57PM -0600, Bob Van Valzah wrote: >> > > But I'm not aware of any way to script input to boot0. Hence > > booting one branch or the other currently requires a console > > key press and so can't be automated. I missed the beginning of this thread, but boot2 (I think it is) can read a file of commands from /boot/somewhere, and you COULD write a script to put commands in that file. Seems to me that you might be able to get what you wanted from that. I know that at one time I had mixed up some partitions on an install of mine, and I used to "boot up" my -stable partition, but I had that load in my -current system via this loader config file in my -stable system. Sorry this is so vague, but I only played with that loader config file the one time, and that was nearly a year ago. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Mar 6 18:35:10 2002 Delivered-To: freebsd-smp@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id 446E437B402; Wed, 6 Mar 2002 18:35:07 -0800 (PST) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 368927830F; Thu, 7 Mar 2002 13:05:05 +1030 (CST) Date: Thu, 7 Mar 2002 13:05:05 +1030 From: Greg Lehey To: John Baldwin Cc: Glenn Gombert , smp@FreeBSD.org Subject: Re: Some thoughts on Giant instrumentation Message-ID: <20020307130505.P66287@wantadilla.lemis.com> References: <3.0.6.32.20020228184845.00da5868@imatowns.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF 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 On Thursday, 28 February 2002 at 20:33:10 -0500, John Baldwin wrote: > > On 28-Feb-02 Glenn Gombert wrote: >> I think what needs to be added (and is sorely lacking) are some good >> syscalls (that can be called from 'userland' to perform such things as dump >> out the 'ktr' buffer from a user land program and show contents of some of >> the other kernel parameters (when using a test program from user land). It >> seems like a good set of 'debug syscalls' would be a good addition to the >> smp code that is -current and would make debugging/development efforts >> easier and more efficient for everyone :)) > > Yep, being able to dump ktr to userland would be rather cool indeed if you'd > like to tackle it. :) A program to do this already exists for BSD/OS. We have the sources, but we never got round to porting it. Look for tdump(8). Greg -- See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Wed Mar 6 18:37:56 2002 Delivered-To: freebsd-smp@freebsd.org Received: from tisch.mail.mindspring.net (tisch.mail.mindspring.net [207.69.200.157]) by hub.freebsd.org (Postfix) with ESMTP id B951337B402; Wed, 6 Mar 2002 18:37:52 -0800 (PST) Received: from user-1120a3q.dsl.mindspring.com ([66.32.40.122] helo=europa2) by tisch.mail.mindspring.net with smtp (Exim 3.33 #1) id 16inms-0007nG-00; Wed, 06 Mar 2002 21:37:46 -0500 Message-Id: <3.0.6.32.20020306213608.00da60d0@imatowns.com> X-Sender: ggombert@imatowns.com X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Wed, 06 Mar 2002 21:36:08 -0500 To: Greg Lehey , John Baldwin From: Glenn Gombert Subject: Re: Some thoughts on Giant instrumentation Cc: smp@FreeBSD.org In-Reply-To: <20020307130505.P66287@wantadilla.lemis.com> References: <3.0.6.32.20020228184845.00da5868@imatowns.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 I was looking at getting started on this task, this weekend, since I do not have access to the sources, can someone extract the file(s) in question for me to have a look at what has been done already ?? At 01:05 PM 3/7/2002 +1030, Greg Lehey wrote: >On Thursday, 28 February 2002 at 20:33:10 -0500, John Baldwin wrote: >> >> On 28-Feb-02 Glenn Gombert wrote: >>> I think what needs to be added (and is sorely lacking) are some good >>> syscalls (that can be called from 'userland' to perform such things as dump >>> out the 'ktr' buffer from a user land program and show contents of some of >>> the other kernel parameters (when using a test program from user land). It >>> seems like a good set of 'debug syscalls' would be a good addition to the >>> smp code that is -current and would make debugging/development efforts >>> easier and more efficient for everyone :)) >> >> Yep, being able to dump ktr to userland would be rather cool indeed if you'd >> like to tackle it. :) > >A program to do this already exists for BSD/OS. We have the sources, >but we never got round to porting it. Look for tdump(8). > >Greg >-- >See complete headers for address and phone numbers > Glenn Gombert ggombert@imatowns.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Thu Mar 7 17:51:10 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 3ED5637B400 for ; Thu, 7 Mar 2002 17:51:02 -0800 (PST) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g281ovKD067648; Thu, 7 Mar 2002 20:51:00 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: Date: Thu, 7 Mar 2002 20:50:55 -0500 To: Barney Wolff , Bob Van Valzah From: Garance A Drosihn Subject: Re: -CURRENT and -STABLE Cross Booting? Cc: SMP@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) 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 >At 12:34 AM -0500 3/6/02, Garance A Drosihn wrote: >>On Tue, Mar 05, 2002 at 01:38:57PM -0600, Bob Van Valzah wrote: >>> >> > But I'm not aware of any way to script input to boot0. Hence >> > booting one branch or the other currently requires a console >> > key press and so can't be automated. > >I missed the beginning of this thread, but boot2 (I think it >is) can read a file of commands from /boot/somewhere, and you >COULD write a script to put commands in that file. Seems to >me that you might be able to get what you wanted from that. By sheer coincidence, someone also recently pointed me at the 'bootcfg' command. If you're daring, you could maybe use this to switch between which partition boot0 will chose by default. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Thu Mar 7 18:51:43 2002 Delivered-To: freebsd-smp@freebsd.org Received: from smtp.whitebarn.com (Spin.whitebarn.com [216.0.13.113]) by hub.freebsd.org (Postfix) with ESMTP id D7F6437B402 for ; Thu, 7 Mar 2002 18:51:38 -0800 (PST) Received: from Talarian.Com (Chin.whitebarn.com [216.0.13.79]) by smtp.whitebarn.com (8.9.3/8.9.3) with ESMTP id UAA32218; Thu, 7 Mar 2002 20:51:20 -0600 (CST) (envelope-from Bob@Talarian.Com) Message-ID: <3C882712.3050307@Talarian.Com> Date: Thu, 07 Mar 2002 20:50:58 -0600 From: Bob Van Valzah User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Garance A Drosihn Cc: Barney Wolff , SMP@FreeBSD.ORG Subject: Re: -CURRENT and -STABLE Cross Booting? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 The bootcfg command sounds very promising, but I can't find it command anywhere in FreeBSD. No mention of it on the mailing lists either. I see a bootcfg command in Windows XP, but it doesn't seem to futz with the MBR. Can you please give me a little more to go on? Stumped but optimistic, Bob Garance A Drosihn wrote: >> At 12:34 AM -0500 3/6/02, Garance A Drosihn wrote: >> >>> On Tue, Mar 05, 2002 at 01:38:57PM -0600, Bob Van Valzah wrote: >>> >>>> >>> > But I'm not aware of any way to script input to boot0. Hence >>> > booting one branch or the other currently requires a console >>> > key press and so can't be automated. >> >> >> I missed the beginning of this thread, but boot2 (I think it >> is) can read a file of commands from /boot/somewhere, and you >> COULD write a script to put commands in that file. Seems to >> me that you might be able to get what you wanted from that. > > > By sheer coincidence, someone also recently pointed me at the > 'bootcfg' command. If you're daring, you could maybe use this > to switch between which partition boot0 will chose by default. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Thu Mar 7 18:54:18 2002 Delivered-To: freebsd-smp@freebsd.org Received: from isris.pair.com (isris.pair.com [209.68.2.39]) by hub.freebsd.org (Postfix) with SMTP id 8747037B405 for ; Thu, 7 Mar 2002 18:54:15 -0800 (PST) Received: (qmail 7218 invoked by uid 3130); 8 Mar 2002 02:54:14 -0000 Date: Thu, 7 Mar 2002 21:54:14 -0500 From: Garrett Rooney To: Bob Van Valzah Cc: Garance A Drosihn , Barney Wolff , SMP@FreeBSD.ORG Subject: Re: -CURRENT and -STABLE Cross Booting? Message-ID: <20020308025414.GC44988@electricjellyfish.net> References: <3C882712.3050307@Talarian.Com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C882712.3050307@Talarian.Com> User-Agent: Mutt/1.3.25i 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 On Thu, Mar 07, 2002 at 08:50:58PM -0600, Bob Van Valzah wrote: > The bootcfg command sounds very promising, but I can't find it command > anywhere in FreeBSD. No mention of it on the mailing lists either. I see > a bootcfg command in Windows XP, but it doesn't seem to futz with the MBR. > > Can you please give me a little more to go on? He probably means boot0cfg. man boot0cfg should give you what you want. -garrett -- garrett rooney Unix was not designed to stop you from rooneg@electricjellyfish.net doing stupid things, because that would http://electricjellyfish.net/ stop you from doing clever things. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Thu Mar 7 19: 5:54 2002 Delivered-To: freebsd-smp@freebsd.org Received: from smtp.whitebarn.com (Spin.whitebarn.com [216.0.13.113]) by hub.freebsd.org (Postfix) with ESMTP id A070237B417 for ; Thu, 7 Mar 2002 19:05:35 -0800 (PST) Received: from Talarian.Com (Chin.whitebarn.com [216.0.13.79]) by smtp.whitebarn.com (8.9.3/8.9.3) with ESMTP id VAA32290; Thu, 7 Mar 2002 21:04:40 -0600 (CST) (envelope-from Bob@Talarian.Com) Message-ID: <3C882A33.2030704@Talarian.Com> Date: Thu, 07 Mar 2002 21:04:19 -0600 From: Bob Van Valzah User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Garrett Rooney Cc: Garance A Drosihn , Barney Wolff , SMP@FreeBSD.ORG Subject: Re: -CURRENT and -STABLE Cross Booting? References: <3C882712.3050307@Talarian.Com> <20020308025414.GC44988@electricjellyfish.net> Content-Type: multipart/alternative; boundary="------------030302020300030807080603" 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 --------------030302020300030807080603 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Got it. Looks like boot0cfg -s is exactly what I was after. Many thanks! Bob Garrett Rooney wrote: >On Thu, Mar 07, 2002 at 08:50:58PM -0600, Bob Van Valzah wrote: > >>The bootcfg command sounds very promising, but I can't find it command >>anywhere in FreeBSD. No mention of it on the mailing lists either. I see >>a bootcfg command in Windows XP, but it doesn't seem to futz with the MBR. >> >>Can you please give me a little more to go on? >> > >He probably means boot0cfg. man boot0cfg should give you what you >want. > >-garrett > --------------030302020300030807080603 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Got it. Looks like boot0cfg -s is exactly what I was after.

    Many thanks!

    Bob

Garrett Rooney wrote:
On Thu, Mar 07, 2002 at 08:50:58PM -0600, Bob Van Valzah wrote:
The bootcfg command sounds very promising, but I can't find it command 
anywhere in FreeBSD. No mention of it on the mailing lists either. I see
a bootcfg command in Windows XP, but it doesn't seem to futz with the MBR.

Can you please give me a little more to go on?

He probably means boot0cfg. man boot0cfg should give you what you
want.

-garrett


--------------030302020300030807080603-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sat Mar 9 12:59:32 2002 Delivered-To: freebsd-smp@freebsd.org Received: from www.suntop-cn.com (www.suntop-cn.com [61.140.76.155]) by hub.freebsd.org (Postfix) with ESMTP id 12A7337B417 for ; Sat, 9 Mar 2002 12:59:27 -0800 (PST) Received: from notebook ([61.144.145.138]) (authenticated) by www.suntop-cn.com (8.11.3/8.11.3) with ESMTP id g29HW1w97850 for ; Sun, 10 Mar 2002 01:32:01 +0800 (CST) (envelope-from slack@suntop-cn.com) Message-ID: <000501c1c790$52a64150$e901a8c0@testterm.com> From: "Edwin Chen" To: Subject: newby to smp FreeBSD world Date: Sun, 10 Mar 2002 01:31:55 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 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 SGksIGV2ZXJib2R5DQoNCnJlY2VudGx5LCBpIGJ1eSBhIG5ldyBib3ggd2l0aCAyIFBJSUkgODAw TUh6IENQVSBhbmQgMTI4TSBSQU0sIEkgaW5zdGFsbGVkIEZyZWVCU0QgNC41IGFuZCBjb21waWxl ZCB3aXRoIFNNUCBzdXBwb3J0LCBJdCdzIHdvcmtlZCEgYnV0IEkgZG9uJ3Qga25vdyBpZiBJIG5l ZWQgaW5zdGFsbCBhbGwgc3JjIGFuZCBydW4gYnVpbGR3b3JsZCB0byBnb3QgdGhlIGJlbmVmaXQg ZnJvbSBTTVA/IGlmIEkgbmVlZCByZWNvbXBpbGVkIGFsbCBzb2Z0d2FyZSBJIGp1c3QgaW5zdGFs bGVkIGZyb20gcG9ydHMgPyB3aGVyZSBJIGNhbiBnb3QgdGhlIGRldGFpbCBkZXNjcmliZSBhcnRp Y2xlcyA/DQoNCnBsZWFzZSBDQyB0byBtZSwgSSBhbSBub3QgYSBtZW1iZXIgb2YgdGhpcyBtYWls bGlzdC4NCg0KZWR3aW4gY2hlbg0K To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Sat Mar 9 20:48:30 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mass.dis.org (dhcp45-21.dis.org [216.240.45.21]) by hub.freebsd.org (Postfix) with ESMTP id 746D737B405 for ; Sat, 9 Mar 2002 20:48:24 -0800 (PST) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.6) with ESMTP id g282BAt01489; Thu, 7 Mar 2002 18:11:10 -0800 (PST) (envelope-from msmith@mass.dis.org) Message-Id: <200203080211.g282BAt01489@mass.dis.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "M. Warner Losh" Cc: smp@FreeBSD.org Subject: Interrupt Context becomes a misnomer (was Re: Core recognizes SMPng tech lead ) In-reply-to: Your message of "Thu, 07 Mar 2002 18:56:17 MST." <20020307.185617.118790071.imp@village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 07 Mar 2002 18:11:08 -0800 From: Michael Smith 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 (moved to smp@) > This can be described as "newbus doesn't change often enough to do > anything other than one big lock around it." However, I must admit > that I've not thought through the implications of devices arriving and > leaving at interrupt context. I've been talking about this with various people, but here's a good point at which to bring up something that folks working on device drivers should think long and hard about. We should stop doing (almost) anything in "interrupt context". An interrupt handler should at most: - pacify the interrupting device - make the driver's interrupt thread runnable Now, before you all start screaming about "fast interrupts", yes, there are a few devices that require special treatment. But there aren't many of them, and they can be accomodated in this model (by doing slightly more in the interrupt handler). In the case where a device can't be "pacified" without considerable work (this is fairly rare), the handler can return status indicating that the interrupt should be masked until the thread has run. You can turn the concept on it's head and view it as making every driver have a "fast" interrupt handler. "Slow" handlers go away, making the issue of handling things "in interrupt context" much less of a problem, since almost nothing (clock code notwithstanding) is called from interrupt context. This isn't a particularly novel approach; Apple use it, BSD/OS is likely to go this way, and it's strongly encouraged by the IA64 interrupt model. I'm sure that plenty of other systems do things this way as well; I just don't have the research hours to track them down. Just food for thought at this stage, but something that anyone working on interrupt handling should take to heart. Regards, Mike -- To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public. - Theodore Roosevelt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message