Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Jason Evans
Robert Watson wrote: On Fri, 27 Mar 2009, Poul-Henning Kamp wrote: In message , Robert Wats on writes: In which case user application threads will need to know their CPU [...] Didn't jemalloc solve that problem once already ? I think jemalloc implements thread-affinity for arenas rather t

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Robert Watson
On Fri, 27 Mar 2009, Poul-Henning Kamp wrote: In message , Robert Wats on writes: In which case user application threads will need to know their CPU [...] Didn't jemalloc solve that problem once already ? I think jemalloc implements thread-affinity for arenas rather than CPU-affinity in

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Poul-Henning Kamp
In message , Robert Wats on writes: >In which case user application threads will need to >know their CPU [...] Didn't jemalloc solve that problem once already ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Robert Watson
On Fri, 27 Mar 2009, Poul-Henning Kamp wrote: In message , Robert Wats on writes: I guess interesting questions are whether (a) it would be desirable to have per-page, per-cpu, or per-thread mappings. If there are non-synchronized TSCs, then there might be some interesting advantages to a p

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Poul-Henning Kamp
In message , Robert Wats on writes: >I guess interesting questions are whether (a) it would be desirable to have >per-page, per-cpu, or per-thread mappings. If there are non-synchronized >TSCs, then there might be some interesting advantages to a per-CPU page. Rule #3: The only thing w

Re: Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Robert Watson
On Fri, 27 Mar 2009, Sergey Babkin wrote: Would not a normal mmap be duplicated on fork? I'd do it as a small pseudo-= driver that allows to mmap this page. Then libc would open this pseudo-d= evice and mmap it, either in the on-load handler or on the first call of= gettimeofday().

Re: Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Sergey Babkin
Would not a normal mmap be duplicated on fork? I'd do it as a small pseudo-= driver that allows to mmap this page. Then libc would open this pseudo-d evice and mmap it, either in the on-load handler or on the first call of gettimeofday(). I think, that should be it, no specia

Building a DDB friendly kernel/drivers?

2009-03-27 Thread Alexander Sack
Hi Folks: I'm debugging an issue with a third-party driver that causes an NMI during driver initialization. It only occurs for one version of the driver thus far. I want to isolate what triggers the NMI and generally get a feel for the initialization of the hardware. I'm running a 6.x-amd64 ker

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Chuck Swiger
Hi, Scott & all-- On Mar 27, 2009, at 11:30 AM, Scott Long wrote: Robert Watson wrote: On Fri, 27 Mar 2009, Scott Long wrote: I've been talking about this for years. All I need is help with the VM magic to create the page on fork. I also want two pages, one global for gettimeofday (and an

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Julian Elischer
Scott Long wrote: Robert Watson wrote: On Fri, 27 Mar 2009, Scott Long wrote: I've been talking about this for years. All I need is help with the VM magic to create the page on fork. I also want two pages, one global for gettimeofday (and any other global data we can think of) and one per

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Julian Elischer
Scott Long wrote: I've been talking about this for years. All I need is help with the VM magic to create the page on fork. I also want two pages, one global for gettimeofday (and any other global data we can think of) and one per-process for static data like getpid/getgid. interestingly it i

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Scott Long
Robert Watson wrote: On Fri, 27 Mar 2009, Scott Long wrote: I've been talking about this for years. All I need is help with the VM magic to create the page on fork. I also want two pages, one global for gettimeofday (and any other global data we can think of) and one per-process for static

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Robert Watson
On Fri, 27 Mar 2009, Scott Long wrote: I've been talking about this for years. All I need is help with the VM magic to create the page on fork. I also want two pages, one global for gettimeofday (and any other global data we can think of) and one per-process for static data like getpid/getg

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Robert Watson
On Fri, 27 Mar 2009, Scott Long wrote: I've been talking about this for years. All I need is help with the VM magic to create the page on fork. I also want two pages, one global for gettimeofday (and any other global data we can think of) and one per-process for static data like getpid/getg

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Alexander Sack
On Fri, Mar 27, 2009 at 1:31 PM, Poul-Henning Kamp wrote: > In message <49cd0405.1060...@samsco.org>, Scott Long writes: > >>I've been talking about this for years.  All I need is help with the VM >>magic to create the page on fork.  I also want two pages, one global >>for gettimeofday (and any ot

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Poul-Henning Kamp
In message <49cd0405.1060...@samsco.org>, Scott Long writes: >I've been talking about this for years. All I need is help with the VM >magic to create the page on fork. I also want two pages, one global >for gettimeofday (and any other global data we can think of) and one >per-process for static

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Scott Long
I've been talking about this for years. All I need is help with the VM magic to create the page on fork. I also want two pages, one global for gettimeofday (and any other global data we can think of) and one per-process for static data like getpid/getgid. Scott Sergey Babkin wrote: (Sorr

Re: CURRENT sees only /dev/ad2s1a, but not /dev/ad3s1a

2009-03-27 Thread Paul B. Mahol
On 3/27/09, Matthias Apitz wrote: > > Hello, > > When I boot my EeePC from USB key (/dev/da0s1a) -CURRENT it sees the two SSD > only > as > > $ ls -l /dev/ad* > /dev/ad2 > /dev/ad2s1 > /dev/ad2s1a > /dev/ad3 > /dev/ad3a > > I can mount /dev/ad2s1a but ofc not /dev/ad3s1a; > > when I'm booting the

Re: amr driver broken since March 12

2009-03-27 Thread Scott Lambert
On Fri, Mar 27, 2009 at 06:52:32PM +0300, Danny Braniss wrote: > > Danny Braniss wrote: > > > at least for me :-) > > > [and sorry for the cross posting] > > > > > > old (March 12 , i know need the svn rev number but...) > > > > None of the commit activity on March 12 is jumping out at me as bein

Re: amr driver broken since March 12

2009-03-27 Thread Scott Long
Danny Braniss wrote: Danny Braniss wrote: at least for me :-) [and sorry for the cross posting] old (March 12 , i know need the svn rev number but...) None of the commit activity on March 12 is jumping out at me as being suspicious. However, you are now the second person who has told me abou

Re: amr driver broken since March 12

2009-03-27 Thread Danny Braniss
> Danny Braniss wrote: > > at least for me :-) > > [and sorry for the cross posting] > > > > old (March 12 , i know need the svn rev number but...) > > None of the commit activity on March 12 is jumping out at me as being > suspicious. However, you are now the second person who has told me > a

Re: Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Sergey Babkin
(Sorry for the top quoting). Probably the best implementation of gettimeofd= ay() is to have a page in the kernel mapped read-only to all the user pr= ocesses. Put the kernel's idea of time into this page. Then getting the = time becomes a simple read (OK, two reads, to make sure

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Eugene Grosbein
Prashant Vaibhav wrote: > The primary idea is to improve the performance and resolution of > gettimeofday() and friends by creating a efficient userspace implementation > of these functions, along with some supporting modifications to the kernel. Are you aware of CLOCK_*_FAST family of timecounte

CURRENT sees only /dev/ad2s1a, but not /dev/ad3s1a

2009-03-27 Thread Matthias Apitz
Hello, When I boot my EeePC from USB key (/dev/da0s1a) -CURRENT it sees the two SSD only as $ ls -l /dev/ad* /dev/ad2 /dev/ad2s1 /dev/ad2s1a /dev/ad3 /dev/ad3a I can mount /dev/ad2s1a but ofc not /dev/ad3s1a; when I'm booting the RELENG_7 from /dev/ad2s1a itself it looks like this: $ mount /

Re: Switching to SMM with FreeBSD 6.2 onwards

2009-03-27 Thread Won De Erick
--- On Fri, 3/27/09, Andriy Gapon wrote: > on 27/03/2009 15:47 Won De Erick said > the following: > > --- On Fri, 3/27/09, Andriy Gapon > wrote: > >> on 27/03/2009 12:35 Ivan Voras said the > following: > >>> One thing that comes to my mind is this: > >>> http://invisiblethingslab.com/resources

Re: Switching to SMM with FreeBSD 6.2 onwards

2009-03-27 Thread Andriy Gapon
on 27/03/2009 15:47 Won De Erick said the following: > --- On Fri, 3/27/09, Andriy Gapon wrote: >> on 27/03/2009 12:35 Ivan Voras said the following: >>> One thing that comes to my mind is this: >>> http://invisiblethingslab.com/resources/misc09/smm_cache_fun.pdf > > I will add that to the ff: >

Re: Switching to SMM with FreeBSD 6.2 onwards

2009-03-27 Thread Won De Erick
--- On Fri, 3/27/09, Andriy Gapon wrote: > on 27/03/2009 12:35 Ivan Voras said > the following: > > Takanori Watanabe wrote: > >> In message <17314.10813...@web45811.mail.sp1.yahoo.com>, > Won De Erick wrote: > >>> Hi All, > >>> > >>> I'm not quite familiar with FreeBSD, but I > >>> want to do th

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Poul-Henning Kamp
In message <17560ccf0903270555oe7d1652p7414a221aa2d6...@mail.gmail.com>, Prashant Vaibhav writes: >>[...] these must provide a monotonic timescale when queried interleaved >> ? Be aware that the TSC may not be, and may not stay synchronized across >> multiple cores. > >The TSC is documented to be

Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

2009-03-27 Thread Prashant Vaibhav
Poul-Henning, Thanks for the feedback! >[...] these must provide a monotonic timescale when queried interleaved > ? Be aware that the TSC may not be, and may not stay synchronized across > multiple cores. The TSC is documented to be monotonically increasing across all x86 processors that impleme

Re: Switching to SMM with FreeBSD 6.2 onwards

2009-03-27 Thread Andriy Gapon
on 27/03/2009 12:35 Ivan Voras said the following: > Takanori Watanabe wrote: >> In message <17314.10813...@web45811.mail.sp1.yahoo.com>, Won De Erick wrote: >>> Hi All, >>> >>> I'm not quite familiar with FreeBSD, but I want to do the following in >>> 6.2/7.1 >>> . >>> >>> /* Raise IOPL to 3 to

Re: Switching to SMM with FreeBSD 6.2 onwards

2009-03-27 Thread Ivan Voras
Takanori Watanabe wrote: > In message <17314.10813...@web45811.mail.sp1.yahoo.com>, Won De Erick wrote: >> Hi All, >> >> I'm not quite familiar with FreeBSD, but I want to do the following in >> 6.2/7.1 >> . >> >> /* Raise IOPL to 3 to open all I/O ports */ >> /* something like 'i386_iopl(3)' *

Re: Switching to SMM with FreeBSD 6.2 onwards

2009-03-27 Thread Takanori Watanabe
In message <17314.10813...@web45811.mail.sp1.yahoo.com>, Won De Erick wrote: > >Hi All, > >I'm not quite familiar with FreeBSD, but I want to do the following in 6.2/7.1 >. > > /* Raise IOPL to 3 to open all I/O ports */ > /* something like 'i386_iopl(3)' */ > ... see i386_get_ioperm(2) or io

Switching to SMM with FreeBSD 6.2 onwards

2009-03-27 Thread Won De Erick
Hi All, I'm not quite familiar with FreeBSD, but I want to do the following in 6.2/7.1. /* Raise IOPL to 3 to open all I/O ports */ /* something like 'i386_iopl(3)' */ ... /* Open SMRAM access */ outl(unsigned int port, unsigned long int data); Also, I appreciate comments on the fo

doing 'make installworld / installkernel' a second time?

2009-03-27 Thread Matthias Apitz
Hello, I've created a bootable USB key with -CURRENT like this: # mkdir -p /usr/src/CURRENT/obj # cd /usr/src/CURRENT # setenv CVSROOT :pserver:anon...@anoncvs.fr.freebsd.org:/home/ncvs # cvs login # cvs checkout src # cd /usr/src/CURRENT/src # setenv MAKEOBJDIRPREFIX /usr/src/CURRENT/obj # ma