Re: Flash FS for NetBSD

2011-12-05 Thread Adrian Chadd
On 5 December 2011 07:09, Oliver Pinter  wrote:
> Hi all!
>
> Today found this procejt:
> http://chewiefs.sed.hu/
>
> When I good remember, Arounld searched flash fs for bsd, so cc-d.

hah. port away! :)


adrian
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: strange printf(9) format specifier ("Z") in dev/drm code

2011-12-05 Thread Sergey Kandaurov
On 5 December 2011 02:22, Alexander Best  wrote:
> hi there,
>
> i was going through the clang warnings from a GENERIC buildkernel and noticed
> the following:
>
> ===> drm/mga (all)
> /usr/subversion-src/sys/modules/drm/mga/../../../dev/drm/mga_state.c:56:2: 
> error: invalid conversion specifier 'Z' [-Werror,-Wformat-invalid-specifier]
>        BEGIN_DMA(2);
>        ^~~
> @/dev/drm/mga_drv.h:291:35: note: expanded from:
>                DRM_INFO( "   space=0x%x req=0x%Zx\n",                  \
>                                                ^
> @/dev/drm/drmP.h:317:60: note: expanded from:
> #define DRM_INFO(fmt, ...)  printf("info: [" DRM_NAME "] " fmt , 
> ##__VA_ARGS__)
>                                                           ^
> these lines should cover all warnings:
>
> otaku% egrep -r "%[0-9]*Zx" /usr/src/sys/dev/drm
> dev/drm/mga_drv.h:              DRM_INFO( "   space=0x%x req=0x%Zx\n",        
>           \
> dev/drm/mga_drv.h:              DRM_INFO( "   DMA_WRITE( 0x%08x ) at 
> 0x%04Zx\n",        \
>
> ... i couldn't find a reference to an upercase "Z" in the printf(9) man page.
> i talked to dinoex on #freebsd-clang (EFNet) and he said that the "Z" might
> come from linux'es libc5 and is the equaivalent to glibc's "z".
>
> can we adjust those lines, so the clang warnings disappear?

Hi, Alexander.

Can you build-test with this change?
Thanks in advance.

Index: sys/dev/drm/mga_drv.h
===
--- sys/dev/drm/mga_drv.h  (revision 228276)
+++ sys/dev/drm/mga_drv.h  (working copy)
@@ -288,7 +288,7 @@
 do {   \
if ( MGA_VERBOSE ) {\
DRM_INFO( "BEGIN_DMA( %d )\n", (n) );   \
-   DRM_INFO( "   space=0x%x req=0x%Zx\n",  \
+   DRM_INFO( "   space=0x%x req=0x%x\n",   \
  dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \
}   \
prim = dev_priv->prim.start;\
@@ -338,7 +338,7 @@
 #define DMA_WRITE( offset, val )   \
 do {   \
if ( MGA_VERBOSE ) {\
-   DRM_INFO( "   DMA_WRITE( 0x%08x ) at 0x%04Zx\n",\
+   DRM_INFO( "   DMA_WRITE( 0x%08x ) at 0x%04x\n", \
  (u32)(val), write + (offset) * sizeof(u32) ); \
}   \
*(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val; \

-- 
wbr,
pluknet
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: strange printf(9) format specifier ("Z") in dev/drm code

2011-12-05 Thread Alexander Best
On Mon Dec  5 11, Sergey Kandaurov wrote:
> On 5 December 2011 02:22, Alexander Best  wrote:
> > hi there,
> >
> > i was going through the clang warnings from a GENERIC buildkernel and 
> > noticed
> > the following:
> >
> > ===> drm/mga (all)
> > /usr/subversion-src/sys/modules/drm/mga/../../../dev/drm/mga_state.c:56:2: 
> > error: invalid conversion specifier 'Z' [-Werror,-Wformat-invalid-specifier]
> >        BEGIN_DMA(2);
> >        ^~~
> > @/dev/drm/mga_drv.h:291:35: note: expanded from:
> >                DRM_INFO( "   space=0x%x req=0x%Zx\n",                  \
> >                                                ^
> > @/dev/drm/drmP.h:317:60: note: expanded from:
> > #define DRM_INFO(fmt, ...)  printf("info: [" DRM_NAME "] " fmt , 
> > ##__VA_ARGS__)
> >                                                           ^
> > these lines should cover all warnings:
> >
> > otaku% egrep -r "%[0-9]*Zx" /usr/src/sys/dev/drm
> > dev/drm/mga_drv.h:              DRM_INFO( "   space=0x%x req=0x%Zx\n",      
> >             \
> > dev/drm/mga_drv.h:              DRM_INFO( "   DMA_WRITE( 0x%08x ) at 
> > 0x%04Zx\n",        \
> >
> > ... i couldn't find a reference to an upercase "Z" in the printf(9) man 
> > page.
> > i talked to dinoex on #freebsd-clang (EFNet) and he said that the "Z" might
> > come from linux'es libc5 and is the equaivalent to glibc's "z".
> >
> > can we adjust those lines, so the clang warnings disappear?
> 
> Hi, Alexander.
> 
> Can you build-test with this change?
> Thanks in advance.

no that didn't work, but the following patch fixed it for me.

cheers.
alex

> 
> Index: sys/dev/drm/mga_drv.h
> ===
> --- sys/dev/drm/mga_drv.h  (revision 228276)
> +++ sys/dev/drm/mga_drv.h  (working copy)
> @@ -288,7 +288,7 @@
>  do {   \
> if ( MGA_VERBOSE ) {\
> DRM_INFO( "BEGIN_DMA( %d )\n", (n) );   \
> -   DRM_INFO( "   space=0x%x req=0x%Zx\n",  \
> +   DRM_INFO( "   space=0x%x req=0x%x\n",   \
>   dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \
> }   \
> prim = dev_priv->prim.start;\
> @@ -338,7 +338,7 @@
>  #define DMA_WRITE( offset, val )   \
>  do {   \
> if ( MGA_VERBOSE ) {\
> -   DRM_INFO( "   DMA_WRITE( 0x%08x ) at 0x%04Zx\n",\
> +   DRM_INFO( "   DMA_WRITE( 0x%08x ) at 0x%04x\n", \
>   (u32)(val), write + (offset) * sizeof(u32) ); \
> }   \
> *(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val; \
> 
> -- 
> wbr,
> pluknet
Index: sys/dev/drm/mga_drv.h
===
--- sys/dev/drm/mga_drv.h   (revision 228276)
+++ sys/dev/drm/mga_drv.h   (working copy)
@@ -288,7 +288,7 @@
 do {   \
if ( MGA_VERBOSE ) {\
DRM_INFO( "BEGIN_DMA( %d )\n", (n) );   \
-   DRM_INFO( "   space=0x%x req=0x%Zx\n",  \
+   DRM_INFO( "   space=0x%x req=0x%lx\n",  \
  dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \
}   \
prim = dev_priv->prim.start;\
@@ -338,7 +338,7 @@
 #define DMA_WRITE( offset, val )   \
 do {   \
if ( MGA_VERBOSE ) {\
-   DRM_INFO( "   DMA_WRITE( 0x%08x ) at 0x%04Zx\n",\
+   DRM_INFO( "   DMA_WRITE( 0x%08x ) at 0x%04lx\n",\
  (u32)(val), write + (offset) * sizeof(u32) ); \
}   \
*(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val; \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

CPUTYPE and friends, from 'make.conf' benchmark

2011-12-05 Thread rank1seeker
I've took machine and installed binary FreeBSD(amd64 8.2-p4 GENERIC) on it.
Then I've installed 'benchmarks/unixbench' port.

So everything is a default generic binary install ('make.conf' empty - no CPU 
optimization flags)

After running: '# time unixbench', final score was:
394.2
Completed in 22.8 min


Then I've recompiled everything, from src, world and kernel, with 'make.conf':
--
CPUTYPE?=core2
CFLAGS+=-march=native
NO_CPU_CFLAGS=yes
COPTFLAGS+=-march=native
NO_CPU_COPTFLAGS=yes
--

After reboot, I've run: '# time unixbench', final score was:
313.5
Completed in 26.7 min

I'm getting worse result, with optimized FreeBSD's binaries?!?
How come?


Domagoj Smolčić
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: CPUTYPE and friends, from 'make.conf' benchmark

2011-12-05 Thread Garrett Cooper
2011/12/5  :
> I've took machine and installed binary FreeBSD(amd64 8.2-p4 GENERIC) on it.
> Then I've installed 'benchmarks/unixbench' port.
>
> So everything is a default generic binary install ('make.conf' empty - no CPU 
> optimization flags)
>
> After running: '# time unixbench', final score was:
>    394.2
> Completed in 22.8 min
>
>
> Then I've recompiled everything, from src, world and kernel, with 'make.conf':
> --
> CPUTYPE?=core2
> CFLAGS+=-march=native
> NO_CPU_CFLAGS=yes
> COPTFLAGS+=-march=native
> NO_CPU_COPTFLAGS=yes
> --
>
> After reboot, I've run: '# time unixbench', final score was:
>    313.5
> Completed in 26.7 min
>
> I'm getting worse result, with optimized FreeBSD's binaries?!?
> How come?

Seems like -march=native is redundant.
-Garrett
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: CPUTYPE and friends, from 'make.conf' benchmark

2011-12-05 Thread Freddie Cash
2011/12/5 

> I've took machine and installed binary FreeBSD(amd64 8.2-p4 GENERIC) on it.
> Then I've installed 'benchmarks/unixbench' port.
>
> So everything is a default generic binary install ('make.conf' empty - no
> CPU optimization flags)
>
> After running: '# time unixbench', final score was:
>394.2
> Completed in 22.8 min
>
>
> Then I've recompiled everything, from src, world and kernel, with
> 'make.conf':
> --
> CPUTYPE?=core2
> CFLAGS+=-march=native
> NO_CPU_CFLAGS=yes
> COPTFLAGS+=-march=native
> NO_CPU_COPTFLAGS=yes
>

And, how does it do if you remove everything except the CPUTYPE line?  Most
of the rest if unnecessary.

-- 
Freddie Cash
fjwc...@gmail.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: CPUTYPE and friends, from 'make.conf' benchmark

2011-12-05 Thread Chris Rees
On 5 Dec 2011 17:27, "Freddie Cash"  wrote:
>
> 2011/12/5 
>
> > I've took machine and installed binary FreeBSD(amd64 8.2-p4 GENERIC) on
it.
> > Then I've installed 'benchmarks/unixbench' port.
> >
> > So everything is a default generic binary install ('make.conf' empty -
no
> > CPU optimization flags)
> >
> > After running: '# time unixbench', final score was:
> >394.2
> > Completed in 22.8 min
> >
> >
> > Then I've recompiled everything, from src, world and kernel, with
> > 'make.conf':
> > --
> > CPUTYPE?=core2
> > CFLAGS+=-march=native
> > NO_CPU_CFLAGS=yes
> > COPTFLAGS+=-march=native
> > NO_CPU_COPTFLAGS=yes
> >
>
> And, how does it do if you remove everything except the CPUTYPE line?
 Most
> of the rest if unnecessary.
>

Also, you should set these in src.conf.  Sticking them in make.conf is
going to annoy people when you ask why your ports are breaking ;)

Chris
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: CPUTYPE and friends, from 'make.conf' benchmark

2011-12-05 Thread Maxim Khitrov
On Mon, Dec 5, 2011 at 12:19 PM, Garrett Cooper  wrote:
> 2011/12/5  :
>> I've took machine and installed binary FreeBSD(amd64 8.2-p4 GENERIC) on it.
>> Then I've installed 'benchmarks/unixbench' port.
>>
>> So everything is a default generic binary install ('make.conf' empty - no 
>> CPU optimization flags)
>>
>> After running: '# time unixbench', final score was:
>>    394.2
>> Completed in 22.8 min
>>
>>
>> Then I've recompiled everything, from src, world and kernel, with 
>> 'make.conf':
>> --
>> CPUTYPE?=core2
>> CFLAGS+=-march=native
>> NO_CPU_CFLAGS=yes
>> COPTFLAGS+=-march=native
>> NO_CPU_COPTFLAGS=yes
>> --
>>
>> After reboot, I've run: '# time unixbench', final score was:
>>    313.5
>> Completed in 26.7 min
>>
>> I'm getting worse result, with optimized FreeBSD's binaries?!?
>> How come?
>
> Seems like -march=native is redundant.
> -Garrett

Not only is it redundant, but it might be undoing to effects of
CPUTYPE. Run the following command, it tells you what gcc ends up
optimizing for when you use -march=native:

/bin/sh -c "gcc -v -x c -E -mtune=native /dev/null -o /dev/null 2>&1 |
grep mtune | sed -e 's/.*mtune=//'"

On most of my machines, native is the same as generic. Rerun your test
with just 'CPUTYPE?=core2' line in make.conf and see what the results
are. Usually, there is no need to specify any other options.

Also, in 8.2 'core2' seems to be an alias for 'prescott'. You have to
use FreeBSD 9.0 for core2 to be available in gcc.

- Max
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: CPUTYPE and friends, from 'make.conf' benchmark

2011-12-05 Thread Oliver Pinter
On 12/5/11, rank1see...@gmail.com  wrote:
> I've took machine and installed binary FreeBSD(amd64 8.2-p4 GENERIC) on it.
> Then I've installed 'benchmarks/unixbench' port.
>
> So everything is a default generic binary install ('make.conf' empty - no
> CPU optimization flags)
>
> After running: '# time unixbench', final score was:
> 394.2
> Completed in 22.8 min
>
>
> Then I've recompiled everything, from src, world and kernel, with
> 'make.conf':
> --
> CPUTYPE?=core2
> CFLAGS+=-march=native
> NO_CPU_CFLAGS=yes
> COPTFLAGS+=-march=native
> NO_CPU_COPTFLAGS=yes
> --
>
> After reboot, I've run: '# time unixbench', final score was:
> 313.5
> Completed in 26.7 min
>
> I'm getting worse result, with optimized FreeBSD's binaries?!?
> How come?

What is the test environment?

All tests running after a reboot? (if not, then do...)

Run all test in single user, when freebsd reboots, after the system
become up, than we have a running bgfsck (fixme).

And run the tests in multiple time, example with make.conf setting 5X
and without make.conf setting 5X.

>
>
> Domagoj Smolčić
> ___
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
>
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: strange printf(9) format specifier ("Z") in dev/drm code

2011-12-05 Thread Andriy Gapon
on 05/12/2011 16:38 Alexander Best said the following:
> On Mon Dec  5 11, Sergey Kandaurov wrote:
>> On 5 December 2011 02:22, Alexander Best  wrote:
>>> hi there,
>>>
>>> i was going through the clang warnings from a GENERIC buildkernel and 
>>> noticed
>>> the following:
>>>
>>> ===> drm/mga (all)
>>> /usr/subversion-src/sys/modules/drm/mga/../../../dev/drm/mga_state.c:56:2: 
>>> error: invalid conversion specifier 'Z' [-Werror,-Wformat-invalid-specifier]
>>>BEGIN_DMA(2);
>>>^~~
>>> @/dev/drm/mga_drv.h:291:35: note: expanded from:
>>>DRM_INFO( "   space=0x%x req=0x%Zx\n",  \
>>>^
>>> @/dev/drm/drmP.h:317:60: note: expanded from:
>>> #define DRM_INFO(fmt, ...)  printf("info: [" DRM_NAME "] " fmt , 
>>> ##__VA_ARGS__)
>>>   ^
>>> these lines should cover all warnings:
>>>
>>> otaku% egrep -r "%[0-9]*Zx" /usr/src/sys/dev/drm
>>> dev/drm/mga_drv.h:  DRM_INFO( "   space=0x%x req=0x%Zx\n",  
>>> \
>>> dev/drm/mga_drv.h:  DRM_INFO( "   DMA_WRITE( 0x%08x ) at 
>>> 0x%04Zx\n",\
>>>
>>> ... i couldn't find a reference to an upercase "Z" in the printf(9) man 
>>> page.
>>> i talked to dinoex on #freebsd-clang (EFNet) and he said that the "Z" might
>>> come from linux'es libc5 and is the equaivalent to glibc's "z".
>>>
>>> can we adjust those lines, so the clang warnings disappear?
>>
>> Hi, Alexander.
>>
>> Can you build-test with this change?
>> Thanks in advance.
> 
> no that didn't work, but the following patch fixed it for me.

What about Z => z ?

-- 
Andriy Gapon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


boot0.S empty #ifdef

2011-12-05 Thread some body
I sent this to freebsd-drives too but I think that might not be the right
list for it so here it is: I am starting to learn how the kernel works and
have started by going through the boot loader and I've noticed that between
lines 21-32 in boot0.S there are some empty #ifdef statements. I was
wondering a) where are these paramaters defined and if they are defined,
what difference does it make since it looks like it doesn't change anything
since they're empty?


#ifdef SIO
#endif

#ifdef CHECK_DRIVE
#endif

#ifdef ONLY_F_KEYS
#endif
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: CPUTYPE and friends, from 'make.conf' benchmark

2011-12-05 Thread Eitan Adler
On Mon, Dec 5, 2011 at 12:43 PM, Oliver Pinter  wrote:
>... benchmarks ...

http://zedshaw.com/essays/programmer_stats.html

-- 
Eitan Adler
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"