Re: strange ping response times...

2012-04-11 Thread Luigi Rizzo
On Wed, Apr 11, 2012 at 12:35:10PM +0200, Andre Oppermann wrote: > On 11.04.2012 01:32, Luigi Rizzo wrote: > >On Tue, Apr 10, 2012 at 07:05:00PM -0400, Barney Wolff wrote: > >>CPU cache? > >>Cx states? > >>powerd? > > > >powerd is disabled, and i

Re: strange ping response times...

2012-04-11 Thread Luigi Rizzo
On Wed, Apr 11, 2012 at 02:16:49PM +0200, Andre Oppermann wrote: > On 11.04.2012 13:00, Luigi Rizzo wrote: > >On Wed, Apr 11, 2012 at 12:35:10PM +0200, Andre Oppermann wrote: > >>On 11.04.2012 01:32, Luigi Rizzo wrote: > >>>On Tue, Apr 10, 2012 at 07:05:00PM -0400,

Re: strange ping response times...

2012-04-12 Thread Luigi Rizzo
On Thu, Apr 12, 2012 at 01:18:59PM +1000, Bruce Evans wrote: > On Wed, 11 Apr 2012, Luigi Rizzo wrote: > > >On Wed, Apr 11, 2012 at 02:16:49PM +0200, Andre Oppermann wrote: ... > >ping takes a timestamp in userspace before trying to transmit > >the packet, and then the ti

Some performance measurements on the FreeBSD network stack

2012-04-19 Thread Luigi Rizzo
I have been running some performance tests on UDP sockets, using the netsend program in tools/tools/netrate/netsend and instrumenting the source code and the kernel do return in various points of the path. Here are some results which I hope you find interesting. Test conditions: - intel i7-870 CPU

Re: Some performance measurements on the FreeBSD network stack

2012-04-19 Thread Luigi Rizzo
On Thu, Apr 19, 2012 at 10:05:37PM +0200, Andre Oppermann wrote: > On 19.04.2012 15:30, Luigi Rizzo wrote: > >I have been running some performance tests on UDP sockets, > >using the netsend program in tools/tools/netrate/netsend > >and instrumenting the source code and th

Re: Some performance measurements on the FreeBSD network stack

2012-04-19 Thread Luigi Rizzo
On Thu, Apr 19, 2012 at 10:34:45PM +0200, K. Macy wrote: > >> This is indeed a big problem. ?I'm working (rough edges remain) on > >> changing the routing table locking to an rmlock (read-mostly) which > > > > This only helps if your flows aren't hitting the same rtentry. > Otherwise you still con

Re: Some performance measurements on the FreeBSD network stack

2012-04-19 Thread Luigi Rizzo
On Thu, Apr 19, 2012 at 11:20:00PM +0200, Andre Oppermann wrote: > On 19.04.2012 22:46, Luigi Rizzo wrote: ... > >What might be moderately expensive are the critical_enter()/critical_exit() > >calls around individual allocations. > > Can't get away from those as a th

Re: Some performance measurements on the FreeBSD network stack

2012-04-19 Thread Luigi Rizzo
On Fri, Apr 20, 2012 at 12:37:21AM +0200, Andre Oppermann wrote: > On 20.04.2012 00:03, Luigi Rizzo wrote: > >On Thu, Apr 19, 2012 at 11:20:00PM +0200, Andre Oppermann wrote: > >>On 19.04.2012 22:46, Luigi Rizzo wrote: > >>>The allocation happens while the code has

Re: Some performance measurements on the FreeBSD network stack

2012-04-20 Thread Luigi Rizzo
On Thu, Apr 19, 2012 at 11:06:38PM +0200, K. Macy wrote: > On Thu, Apr 19, 2012 at 11:22 PM, Luigi Rizzo wrote: > > On Thu, Apr 19, 2012 at 10:34:45PM +0200, K. Macy wrote: > >> >> This is indeed a big problem. ?I'm working (rough edges remain) on > >> >&

more network performance info: ether_output()

2012-04-20 Thread Luigi Rizzo
Continuing my profiling on network performance, another place were we waste a lot of time is if_ethersubr.c::ether_output() In particular, from the beginning of ether_output() to the final call to ether_output_frame() the code takes slightly more than 210ns on my i7-870 CPU running at 2.93 GHz + T

Re: Some performance measurements on the FreeBSD network stack

2012-04-24 Thread Luigi Rizzo
On Tue, Apr 24, 2012 at 03:16:48PM +0200, Andre Oppermann wrote: > On 19.04.2012 22:46, Luigi Rizzo wrote: > >On Thu, Apr 19, 2012 at 10:05:37PM +0200, Andre Oppermann wrote: > >>On 19.04.2012 15:30, Luigi Rizzo wrote: > >>>I have been running some performance tests

Re: Some performance measurements on the FreeBSD network stack

2012-04-24 Thread Luigi Rizzo
On Tue, Apr 24, 2012 at 02:16:18PM +, Li, Qing wrote: > > > >From previous tests, the difference between flowtable and > >routing table was small with a single process (about 5% or 50ns > >in the total packet processing time, if i remember well), > >but there was a large gain with multiple conc

Re: more network performance info: ether_output()

2012-05-01 Thread Luigi Rizzo
On Tue, May 01, 2012 at 10:27:42AM -0400, George Neville-Neil wrote: > > On Apr 20, 2012, at 15:03 , Luigi Rizzo wrote: > > > Continuing my profiling on network performance, another place > > were we waste a lot of time is if_ethersubr.c::ether_output() > > > >

Re: more network performance info: ether_output()

2012-05-01 Thread Luigi Rizzo
On Tue, May 01, 2012 at 09:09:05PM +, Bjoern A. Zeeb wrote: > > On 1. May 2012, at 15:40 , Luigi Rizzo wrote: > > > On Tue, May 01, 2012 at 10:27:42AM -0400, George Neville-Neil wrote: ... > >> Also, how are you doing the measurements. > > > > The me

fast bcopy...

2012-05-02 Thread Luigi Rizzo
as part of my netmap investigations, i was looking at how expensive are memory copies, and here are a couple of findings (first one is obvious, the second one less so) 1. especially on 64bit machines, always use multiple of at least 8 bytes (possibly even larger units). The bcopy code in amd

Re: Some performance measurements on the FreeBSD network stack

2012-05-03 Thread Luigi Rizzo
On Thu, Apr 19, 2012 at 03:30:18PM +0200, Luigi Rizzo wrote: > I have been running some performance tests on UDP sockets, > using the netsend program in tools/tools/netrate/netsend > and instrumenting the source code and the kernel do return in > various points of the path. Here are

Re: fast bcopy...

2012-05-03 Thread Luigi Rizzo
On Fri, May 04, 2012 at 09:44:15AM +1000, Andrew Reilly wrote: > On Wed, May 02, 2012 at 08:25:57PM +0200, Luigi Rizzo wrote: > > as part of my netmap investigations, i was looking at how > > expensive are memory copies, and here are a couple of findings > > (first one is ob

Re: SUJ file system corruption.

2012-05-18 Thread Luigi Rizzo
On Fri, May 18, 2012 at 10:18:47AM +, Bjoern A. Zeeb wrote: > > On 13. May 2012, at 22:35 , Tim Kientzle wrote: > > > FYI: Saw a crash due to filesystem corruption when running SUJ. > > > > This is on a ARM AM335x system (BeagleBone) that is > > still pretty experimental, so I certainly can

compiled-in virtio / vtnet driver ?

2012-05-29 Thread Luigi Rizzo
hi, i would like to build a kernel with a builtin vtnet driver, but it seems that it is only supported as a module. Any reason for that ? Any tricks i can use to build vtnet in a static kernel ? cheers luigi ___ freebsd-current@freebsd.org mailing list h

RFC: use EM_LEGACY_IRQ in if_lem.c ?

2012-07-24 Thread Luigi Rizzo
if_lem.c ("lem", one of the e1000 drivers) has 2 possible interrupt modes: EM_LEGACY_IRQ uses the standard dispatch mechanism, whereas FAST_INTR has a custom handler that signals a taskqueue to do the job. I have no idea which actual hardware uses it (all of my Intel 1G cards use either "em" or "i

Re: RFC: use EM_LEGACY_IRQ in if_lem.c ?

2012-07-25 Thread Luigi Rizzo
in the image login and then run dhclient em0 netsend 10.0.2.2 5678 60 0 5 cheers luigi > -Andrew > > On Jul 24, 2012, at 4:20 PM, Luigi Rizzo wrote: > > > if_lem.c ("lem", one of the e1000 drivers) has 2 possible interrupt modes: > > EM_LEGACY_

Re: RFC: use EM_LEGACY_IRQ in if_lem.c ?

2012-07-25 Thread Luigi Rizzo
On Wed, Jul 25, 2012 at 07:48:57AM -0700, Adrian Chadd wrote: > On 24 July 2012 13:20, Luigi Rizzo wrote: > > if_lem.c ("lem", one of the e1000 drivers) has 2 possible interrupt modes: > > EM_LEGACY_IRQ uses the standard dispatch mechanism, whereas > > FAST_INTR ha

RFC: libkern version of inet_ntoa_r

2012-07-25 Thread Luigi Rizzo
During some ipfw/dummynet cleanup i noticed that the libkern version of inet_ntoa_r() is missing the buffer size argument that is present in the libc counterpart. Any objection if i fix it ? The change is trivial and the function is used only in a small number of places, see below (some of which a

Re: panic: _mtx_lock_sleep: recursed on non-recursive mutex em0 @ /usr/src/sys/dev/e1000/if_lem.c:881

2012-07-26 Thread Luigi Rizzo
On Thu, Jul 26, 2012 at 09:01:18AM -0700, Garrett Cooper wrote: > On Thu, Jul 26, 2012 at 8:46 AM, David Wolfskill wrote: > > This is at r238795; cut/paste of backtrace: > > > > KDB: enter: panic > > [ thread pid 12 tid 100026 ] > > Stopped at kdb_enter+0x3d: movl$0,kdb_why > > db> bt > >

Re: RFC: use EM_LEGACY_IRQ in if_lem.c ?

2012-07-26 Thread Luigi Rizzo
On Thu, Jul 26, 2012 at 10:52:08PM -0700, Adrian Chadd wrote: > On 25 July 2012 08:14, Luigi Rizzo wrote: > > >> I suggest doing some digging to understand why. I bet we all know the > >> answer, but it would be nice to have it documented and investigated. I > >>

(void)foo or __unused foo ?

2012-07-27 Thread Luigi Rizzo
In writing cross platform code I often have to deal with function arguments or variables that are not used on certain platforms. In FreeBSD:sys/cdefs.h we have #define __unused__attribute__((__unused__)) and in the kernel we tend to annotate with "__unused" such arguments

Re: (void)foo or __unused foo ?

2012-07-27 Thread Luigi Rizzo
On Fri, Jul 27, 2012 at 11:20:48AM +, Poul-Henning Kamp wrote: > In message <20120727093824.gb56...@onelab2.iet.unipi.it>, Luigi Rizzo writes: > > >The alternative way to avoid an 'unused' warning from the compiler > >is an empty statement > > > &

Re: RFC: libkern version of inet_ntoa_r

2012-07-29 Thread Luigi Rizzo
On Sat, Jul 28, 2012 at 10:14:10PM +, Bjoern A. Zeeb wrote: > On Wed, 25 Jul 2012, Luigi Rizzo wrote: > > >During some ipfw/dummynet cleanup i noticed that the libkern version of > >inet_ntoa_r() is missing the buffer size argument that is present in > >the libc

Re: RFC: libkern version of inet_ntoa_r

2012-07-29 Thread Luigi Rizzo
On Sun, Jul 29, 2012 at 05:55:19PM +0100, David Chisnall wrote: > On 29 Jul 2012, at 10:58, Luigi Rizzo wrote: > > > 3. nuke inet_ntoa_r() from libc > > inet_ntoa_r is a public symbol and therefore part of our ABI contract with > userspace applications. Even if no one th

Re: RFC: libkern version of inet_ntoa_r

2012-07-29 Thread Luigi Rizzo
On Sun, Jul 29, 2012 at 03:38:59PM -0400, Arnaud Lacombe wrote: > Hi, > > On Sun, Jul 29, 2012 at 3:19 PM, Luigi Rizzo wrote: > > Remapping f(a) into f(a, b) requires both a macro > > and a wrapping function, something like this > > > >

Re: VirtualBox: Eating up 100% CPU, freezing Windows 7

2012-08-03 Thread Luigi Rizzo
On Fri, Aug 03, 2012 at 07:44:27AM +0200, Bernhard Fr?hlich wrote: > On Fr.,?? 3. Aug. 2012 06:18:33 CEST, Kevin Oberman > wrote: > > > On Thu, Aug 2, 2012 at 12:54 AM, Hartmann, O. > > wrote: > > > I discover that when running Windows 7 in a VirtualBox On FreeBSD 10 > > > (r238968: Wed Aug 1

[RFC] changes in struct dn_pkt_tag ?

2012-08-06 Thread Luigi Rizzo
I just realized that the struct dn_pkt_tag is 232 bytes, with the majority of space taken by an unused field, struct _ip6dn_args (192 bytes), which I'd like to remove. The structure constitutes the body of a PACKET_TAG_DUMMYNET, is defined in sys/netinet/ipfw/ip_dn_io.c and private to the dummynet

rate-limited [kernel] debugging messages ?

2012-08-13 Thread Luigi Rizzo
In my kernel stuff i tend to define debugging macros of the form #define ND(format, ...) do {} while (0) #define D(format, ...) do { } while (0) so it is convenient to comment them out when not needed anymore. I have recently tried the following rate-limited version, wh

CLANG reports an error with %b in printf(9)

2013-10-01 Thread Luigi Rizzo
This is on HEAD -- while compiling the kernel with CLANG and slightly higher warns level, i get errors of this kind (in multiple places): /usr/home/luigi/FreeBSD/head/sys/cam/cam_xpt.c:1069:27: error: invalid conversion specifier 'b' [-Werror,-Wformat-invalid-specifier] prin

error building stable/9 on FreeBSD 10

2013-10-31 Thread Luigi Rizzo
I am having trouble building stable/9 on FreeBSD 10: luigi@bsd10:~ # uname -a FreeBSD bsd10 10.0-BETA1 FreeBSD 10.0-BETA1 #0 r256420: Sun Oct 13 01:43:07 UTC 2013 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 # ./do TREE TARGET # is a script that invokes a make in the source

Re: 11.0-CURRENT: 708.295633 netmap_reset [3011] interface not in netmap mode

2013-11-06 Thread Luigi Rizzo
On Wed, Nov 6, 2013 at 9:12 AM, O. Hartmann wrote: > Since a couple of days now in 11.0-CURRENT, I see this message > > 708.295633 netmap_reset [3011] interface not in netmap mode > > > several times in the console logs. > > What does that mean? > it is a leftover debugging message. i have remov

RFC: adding queue number/size fields to ifnet

2013-11-14 Thread Luigi Rizzo
Hi, it would be useful to have a common place with the indication of NIC parameters such as number of tx/rx queues and their lengths. Various 10G drivers do include this information in various places in the softc, but there is no common place. I was wondering if there is any objection to either

Re: UMA cache back pressure

2013-11-18 Thread Luigi Rizzo
On Mon, Nov 18, 2013 at 10:20 AM, Alexander Motin wrote: > On 18.11.2013 10:41, Adrian Chadd wrote: > >> Your patch does three things: >> >> * adds a couple new buckets; >> > > These new buckets make bucket size self-tuning more soft and precise. > Without them there are buckets for 1, 5, 13, 29,

[RFC] how to get the size of a malloc(9) block ?

2013-11-28 Thread Luigi Rizzo
in porting some linux kernel code to FreeBSD we stumbled upon ksize(), which returns the actual size of a kmalloc() block. We could easily implement it as the first part of realloc(9) -- see kern/kern_malloc.c Would it make sense to add this to the malloc(9) API ? The userspace equivalent seems t

Re: [RFC] how to get the size of a malloc(9) block ?

2013-11-28 Thread Luigi Rizzo
On Thu, Nov 28, 2013 at 01:33:41PM +, jb wrote: > Luigi Rizzo iet.unipi.it> writes: > > > > > in porting some linux kernel code to FreeBSD we > > stumbled upon ksize(), which returns the > > actual size of a kmalloc() block. > > > > We could

Re: [RFC] how to get the size of a malloc(9) block ?

2013-11-29 Thread Luigi Rizzo
On Thu, Nov 28, 2013 at 7:13 AM, jb wrote: > Luigi Rizzo iet.unipi.it> writes: > > > ... > > But I don't understand why you find ksize()/malloc_usable_size() > dangerous. > > ... > > The original crime is commited when *usable size* (an implementatio

Re: [RFC] how to get the size of a malloc(9) block ?

2013-11-29 Thread Luigi Rizzo
On Fri, Nov 29, 2013 at 3:44 PM, jb wrote: > Luigi Rizzo iet.unipi.it> writes: > > > ... > > There is a difference between applications peeking into > > implementation details that should be hidden, and providing > > instead limited and specific infor

Re: [RFC] how to get the size of a malloc(9) block ?

2013-11-29 Thread Luigi Rizzo
On Fri, Nov 29, 2013 at 4:49 PM, Adrian Chadd wrote: > The reason I wouldn't implement this is to avoid having code that > _relies_ on this behaviour in order to function or perform well. > nobody ever said (or could reasonably expect to do) that. Applications don't know if the allocator overa

Re: [RFC] how to get the size of a malloc(9) block ?

2013-11-29 Thread Luigi Rizzo
On Fri, Nov 29, 2013 at 5:02 PM, jb wrote: > Luigi Rizzo iet.unipi.it> writes: > > > ... > > > If you want to improve memory management, that is, have the system > (kernel > > > or user space) handle memory reallocation intelligently and > transparentl

Re: [RFC] how to get the size of a malloc(9) block ?

2013-12-02 Thread Luigi Rizzo
On Mon, Dec 2, 2013 at 4:36 AM, jb wrote: > gmx.com> writes: > > > > > So new flags could be [1]: > > - realloc_flags(p, s, REALLOCF_NO_MOVE) > > ... > > - realloc_flags(p, s, REALLOCF_NO_MOVE | REALLOCF_ELASTIC) > > ... > > For this, there could be a REALLOCF_FORCE flag > > In case of realloc_

'silent' kernel builds ?

2013-12-14 Thread Luigi Rizzo
Hi, I was trying to make buildkernel a bit quieter (just listing the name of the file being compiled). I hoped to modify the " .c.o: " rules in share/sys.mk but apparently kernel builds generate their own Makefile using definitions in sys/conf/kern.pre.mk . As a result, a patch like the one belo

Re: 'silent' kernel builds ?

2013-12-14 Thread Luigi Rizzo
On Sat, Dec 14, 2013 at 09:53:30PM -0800, Rui Paulo wrote: > On 14 Dec 2013, at 21:45, Luigi Rizzo wrote: > > > Hi, > > I was trying to make buildkernel a bit quieter (just listing > > the name of the file being compiled). > > > > I hoped to modify the

RFC can we use __builtin_prefetch() directly in our kernel sources ?

2013-12-16 Thread Luigi Rizzo
Is it ok in kernel code to use __builtin_prefetch() and assume that all supported compilers will do the right thing for all architectures ? I am asking is because I need to use prefetch() in a small number of places in my netmap code, and nothing in our kernel sources uses __builtin_prefetch() dir

RFC: less chatty system builds

2013-12-16 Thread Luigi Rizzo
The following is a proof-of-concept patch to make system builds less chatty. It also has the nice side effect of showing more clearly which rules are used during the build and possibly help debugging the share/mk files and the individual Makefiles. The logic is the following: the environment/make

Re: RFC: less chatty system builds

2013-12-18 Thread Luigi Rizzo
On Mon, Dec 16, 2013 at 10:35 PM, Dimitry Andric wrote: > On 16 Dec 2013, at 19:46, Luigi Rizzo wrote: > > The following is a proof-of-concept patch to make system builds > > less chatty. > > > > It also has the nice side effect of showing more clearly > > whic

Re: RFC: less chatty system builds

2013-12-19 Thread Luigi Rizzo
On Thu, Dec 19, 2013 at 1:18 AM, David Chisnall wrote: > On 16 Dec 2013, at 21:35, Dimitry Andric wrote: > > > In any case, if anything like this is implemented, I would really prefer > > something like CMake does, e.g. give you a percentage counter that > > provides some information about how 'f

Re: RFC: less chatty system builds

2013-12-19 Thread Luigi Rizzo
On Thu, Dec 19, 2013 at 09:57:38AM +, David Chisnall wrote: > > On 19 Dec 2013, at 09:40, Luigi Rizzo wrote: ... > >> Oh, and when I do a build of LLVM/Clang on my laptop using Ninja, it takes > >> about 3-5 minutes, whereas when I do it with our build system it tak

unused in_cksum_update() ?

2014-01-09 Thread Luigi Rizzo
a lot of arch-specific headers (sys/${ARCH}/include/in_cksum.h) have a lengthy definition for in_cksum_update(struct ip *ip) which seems completely unused in our source tree. Time to remove it perhaps ? grep cannot find any use at least since stable/8 cheers luigi __

Re: unused in_cksum_update() ?

2014-01-09 Thread Luigi Rizzo
On Thu, Jan 09, 2014 at 01:27:52PM -0800, Adrian Chadd wrote: > It's likely used elsewhere; it's the kind of thing you abuse when > doing header rewriting and reinjection. So, what's the NAT and such > code using? natd/libalias has its own code with a DifferentialChecksum() function in sys/netinet

Re: unused in_cksum_update() ?

2014-01-10 Thread Luigi Rizzo
On Fri, Jan 10, 2014 at 02:31:40PM +0400, Gleb Smirnoff wrote: > On Thu, Jan 09, 2014 at 08:21:14PM +0100, Luigi Rizzo wrote: > L> a lot of arch-specific headers (sys/${ARCH}/include/in_cksum.h) > L> have a lengthy definition for > L> > L>in_cksum_update(struct ip

picking a new AF_* number for NETLINK ?

2014-01-16 Thread Luigi Rizzo
In porting the kernel openvswitch code to FreeBSD we have implemented netlink sockets, so we need to pick a number to use for AF_NETLINK/PF_NETLINK in the messages. Obviously we'd like ovs to be loadable as a module on existing kernels, so i wonder if there are any restrictions on what we can use

Re: picking a new AF_* number for NETLINK ?

2014-01-17 Thread Luigi Rizzo
On Fri, Jan 17, 2014 at 7:57 AM, Alexander V. Chernikov < melif...@freebsd.org> wrote: > On 17.01.2014 03:19, Luigi Rizzo wrote: > >> In porting the kernel openvswitch code to FreeBSD we >> have implemented netlink sockets, so we need to pick a >> > Wow, great!

svn 260311 breaks gcc builds on releng9 ?

2014-01-17 Thread Luigi Rizzo
Hi, I am seeing an odd problem which seems to be triggered by svn260311 I have two machines running snapshots of stable/9 from last fall (one 255898 sep.26, the other 258126 nov.14). All is amd64 Build a recent head (260311 and newer) with gcc fails on the sep.26 machine: ... 19:

Re: svn 260311 breaks gcc builds on releng9 ?

2014-01-17 Thread Luigi Rizzo
On Fri, Jan 17, 2014 at 12:50 PM, Pedro Giffuni wrote: > Hello Luigi; > > > On 17.01.2014 15:18, Luigi Rizzo wrote: > >> Hi, >> I am seeing an odd problem which seems to be triggered by svn260311 >> >> I have two machines running snapshots of stable/9 fr

Re: svn 260311 breaks gcc builds on releng9 ?

2014-01-17 Thread Luigi Rizzo
On Fri, Jan 17, 2014 at 04:26:30PM -0500, Pedro Giffuni wrote: > On 17.01.2014 16:07, Luigi Rizzo wrote: ... > The Apple change was incomplete so I guess the compiler in head is not > being strict enough. I removed the dead code and rebuilt. > Should be fixed as r260831. > >

possible selrecord optimization ?

2014-01-21 Thread Luigi Rizzo
Looking at how selrecord() / selwakeup() and their Linux counterparts poll_wait() and wake_up() are used, i noticed the following: - linux tends to call wake_up() unconditionally at the beginning of the poll handler - FreeBSD tends to call selrecord() only when it detects a blocking situation

any use for sys/sys/selinfo.h outside the kernel ?

2014-01-22 Thread Luigi Rizzo
Looking at sys/sys/selinfo.h i see that parts of it are in #ifdef _KERNEL ... #endif but it seems to me that also the remaining content (definition of struct selinfo) is only of use within the kernel -- or possibly to programs who want to peek into kmem. So i wonder, does

Re: possible selrecord optimization ?

2014-01-22 Thread Luigi Rizzo
On Wed, Jan 22, 2014 at 02:29:56PM -0500, John Baldwin wrote: > On Tuesday, January 21, 2014 9:25:27 pm Luigi Rizzo wrote: > > Looking at how selrecord() / selwakeup() and their Linux counterparts > > poll_wait() and wake_up() are used, i noticed the following: > > I w

Re: possible selrecord optimization ?

2014-01-23 Thread Luigi Rizzo
On Thu, Jan 23, 2014 at 02:52:41PM -0500, John Baldwin wrote: > On Wednesday, January 22, 2014 7:39:48 pm Luigi Rizzo wrote: ... > > 2. am i correct that we do need to protect concurrent invocations > >of selrecord() on the same selinfo because mtx_pool_find() > >retu

HEAD buildkernel error (aic7xxx_seq.h is missing. Run 'make ahcfirmware')

2014-02-14 Thread Luigi Rizzo
on a freshly checked out HEAD, "make toolchain" followed by "make buildkernel" fails at this stage: ... @ -> /usr/home/luigi/FreeBSD/head/sys machine -> /usr/home/luigi/FreeBSD/head/sys/amd64/include x86 -> /usr/home/luigi/FreeBSD/head/sys/x86/include Error:

Re: HEAD buildkernel error (aic7xxx_seq.h is missing. Run 'make ahcfirmware')

2014-02-14 Thread Luigi Rizzo
On Fri, Feb 14, 2014 at 10:23 AM, Ian Lepore wrote: > On Fri, 2014-02-14 at 18:35 +0100, Luigi Rizzo wrote: > > on a freshly checked out HEAD, > > "make toolchain" followed by "make buildkernel" fails at this stage: > > > > ...

Re: HEAD buildkernel error (aic7xxx_seq.h is missing. Run 'make ahcfirmware')

2014-02-14 Thread Luigi Rizzo
On Fri, Feb 14, 2014 at 10:23 AM, Ian Lepore wrote: > On Fri, 2014-02-14 at 18:35 +0100, Luigi Rizzo wrote: > > on a freshly checked out HEAD, > > "make toolchain" followed by "make buildkernel" fails at this stage: > > > > ...

Re: HEAD buildkernel error (aic7xxx_seq.h is missing. Run 'make ahcfirmware')

2014-02-18 Thread Luigi Rizzo
On Tue, Feb 18, 2014 at 11:24 AM, Ian Lepore wrote: > On Fri, 2014-02-14 at 13:46 -0800, Luigi Rizzo wrote: > > On Fri, Feb 14, 2014 at 10:23 AM, Ian Lepore wrote: > > > > > On Fri, 2014-02-14 at 18:35 +0100, Luigi Rizzo wrote: > > > > on a freshly check

Re: BSD XXI Manifesto [agree] [intersting]

2014-02-21 Thread Luigi Rizzo
On Fri, Feb 21, 2014 at 8:59 PM, Allan Jude wrote: > On 2014-02-21 21:21, Julian Elischer wrote: > > On 2/18/14, 3:28 PM, Wojciech A. Koszek wrote: > >> (cross-posted message: eventual discussion let's keep on hackers@) > >> > >> Hello, > >> > >> After being disappointed with the list of submitte

Re: Select() vs Netmap

2014-06-01 Thread Luigi Rizzo
; > Sincerely, > > > > Fred > > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org > &q

Select() vs Netmap

2014-06-01 Thread Luigi Rizzo
n the traffic delivered to the queues. Cheers Luigi > > > > > Sincerely, > > > > Fred > > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-cu

BUG: some drivers return ENOBUFS when the mbuf is actually queued

2014-06-04 Thread Luigi Rizzo
Hi, if I read correctly the code, there are a few network device drivers (igb, ixgbe, i40e, vtnet, vmxnet) where ifp->if_transmit(ifp, m) can return ENOBUFS even when 'm' has _not_ been dropped: e1000/if_igb.c :: igb_mq_start() can return ENOBUFS from igb_xmit() ixgbe/ixgbe_ma

Re: netmap(4) transparent mode

2014-06-09 Thread Luigi Rizzo
go in soon cheers luigi ​ > > > Cheers, > Franco -- -----+--- Prof. Luigi RIZZO, ri...@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/. Universita` di Pisa TEL +39-05

how to i get both clang and gcc4.2.1 in buildworld ?

2014-06-10 Thread Luigi Rizzo
As the subject says... i upgraded to stable/10 without special options, clang is the default compiler but the gcc4.2.1 whose sources are in the tree is not compiled. Is there any way to get both gcc and clang compiled during a buildworld ? Or any port that brings in the gcc 4.2.1 (and not one of t

Re: Problems building FreeBSD 9.2 on FreeBSD 10

2014-06-17 Thread Luigi Rizzo
On Tue, Jun 17, 2014 at 8:35 PM, Craig Rodrigues wrote: > Simon, > > Do you know if there is some sort of patch that can be applied to > FreeBSD stable/9 sources so that it can be built on a FreeBSD > 10/stable, or FreeBSD CURRENT > host with bmake? > > I'm trying to build a FreeBSD stable/9 jail

do we have a generic string-number sysctl mapping library ?

2014-06-27 Thread Luigi Rizzo
Hi, I have frequently found myself using sysctls to control some kernel feature where a string would be a better (and sometimes the only) option than using a numeric value, yet the internal representation should be numeric for speed and robustness. Examples are the kern.timecounter, the default sch

Re: do we have a generic string-number sysctl mapping library ?

2014-06-27 Thread Luigi Rizzo
On Fri, Jun 27, 2014 at 11:27:56AM +0200, Trond Endrest?l wrote: > On Fri, 27 Jun 2014 11:14+0200, Luigi Rizzo wrote: > > > Hi, > > I have frequently found myself using sysctls to control some kernel > > feature where a string would be a better (and sometimes the only)

Re: Fix Emulex "oce" driver in CURRENT

2014-07-01 Thread Luigi Rizzo
On Tue, Jul 1, 2014 at 8:58 PM, wrote: > El 30.06.2014 18:36, Stefano Garzarella escribió: > > Hello, >> I had problems during some experiments with Emulex and "oce" driver in >> CURRENT. >> I found several bugs in the "oce" driver and this patch fixes them. >> > > At least with some cards, the

Re: FreeBSD iscsi target

2014-07-04 Thread Luigi Rizzo
On Fri, Jul 4, 2014 at 12:16 PM, Slawa Olhovchenkov wrote: > On Thu, Jul 03, 2014 at 08:39:42PM -0700, Kevin Oberman wrote: > > > > > > > In real world "Reality is quite different than it actually is". > > > > > > > http://www.cisco.com/c/en/us/products/collateral/switches/catalyst-6500-series-sw

Re: Fix Emulex "oce" driver in CURRENT

2014-07-07 Thread Luigi Rizzo
On Mon, Jul 7, 2014 at 1:03 PM, Borja Marcos wrote: > > On Jul 1, 2014, at 10:24 PM, Luigi Rizzo wrote: > >> >> >> >> On Tue, Jul 1, 2014 at 8:58 PM, wrote: >> El 30.06.2014 18:36, Stefano Garzarella escribió: >> >> Hello, >> I had problem

Re: Fix Emulex "oce" driver in CURRENT

2014-07-07 Thread Luigi Rizzo
On Mon, Jul 7, 2014 at 1:57 PM, Borja Marcos wrote: ... > The environment details are here: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=183391 > > The way I produce an instant panic is: > > 1) Connect to another machine (cross connect cable) > > 2) iperf3 -s on the other machine > (The

Re: android bsd connectivity tools etc ?

2014-08-14 Thread Luigi Rizzo
On Thu, Aug 14, 2014 at 09:40:56AM +0200, Lars Engels wrote: > On Thu, Aug 14, 2014 at 08:29:37AM +0200, Per olof Ljungmark wrote: > > On 08/14/14 01:47, Julian H. Stacey wrote: > > > Hi, > > > Any tips for Android / FreeBSD BSD tools for connectivity etc ? ... > There's also Airdroid [1]. After in

Re: [RFC] Add support for hardware transmit rate limiting queues [WAS: Add support for changing the flow ID of TCP connections]

2014-08-20 Thread Luigi Rizzo
On Wed, Aug 20, 2014 at 9:34 AM, Hans Petter Selasky wrote: > Hi, > > A month has passed since the last e-mail on this topic, and in the > meanwhile some new patches have been created and tested: > > Basically the approach has been changed a little bit: > > - The creation of hardware transmit rin

Re: [RFC] Add support for hardware transmit rate limiting queues [WAS: Add support for changing the flow ID of TCP connections]

2014-08-20 Thread Luigi Rizzo
On Wed, Aug 20, 2014 at 3:29 PM, Hans Petter Selasky wrote: > Hi Luigi, > > > On 08/20/14 11:32, Luigi Rizzo wrote: > >> On Wed, Aug 20, 2014 at 9:34 AM, Hans Petter Selasky >> wrote: >> >> Hi, >>> >>> A month has passed since the las

RFC: please put back spare fields in struct ifnet (removed in svn 270870)

2014-09-09 Thread Luigi Rizzo
hi, sorry if i just noticed it recently. svn 270870 removed all the if_*spare fields in struct ifnet. They are replaced with the following comment /* * Spare fields to be added before branching a stable branch, so * that structure can be enhanced without changing the kernel * binary interface.

Re: RFC: please put back spare fields in struct ifnet (removed in svn 270870)

2014-09-09 Thread Luigi Rizzo
On Tue, Sep 9, 2014 at 12:37 PM, Gleb Smirnoff wrote: > Luigi, > > On Tue, Sep 09, 2014 at 12:13:42PM +0200, Luigi Rizzo wrote: > L> svn 270870 removed all the if_*spare fields in struct ifnet. > L> They are replaced with the following comment > L> > L> /*

Re: RFC: please put back spare fields in struct ifnet (removed in svn 270870)

2014-09-09 Thread Luigi Rizzo
On Tue, Sep 9, 2014 at 2:17 PM, Gleb Smirnoff wrote: > Luigi, > > On Tue, Sep 09, 2014 at 01:01:13PM +0200, Luigi Rizzo wrote: > L> > The harm is obvious: someone commits code that _uses_ spare field > L> > without assigning it a new name. Spare field is a placeholde

head build error (header pollution ?) after 249958

2013-05-05 Thread Luigi Rizzo
Since svn 249959 (when NO_IDEA was removed) I cannot build HEAD on a somewhat recent stable/9 (see below; kernel and userland in sync) > uname -a FreeBSD bsd9 9.1-STABLE FreeBSD 9.1-STABLE #0 r248472: Tue Mar 19 08:36:09 CET 2013 luigi@bsd9:.../RELENG_9/sys/LUIGI am

Re: head build error (header pollution ?) after 249958

2013-05-05 Thread Luigi Rizzo
On Sun, May 05, 2013 at 01:52:37PM +0200, Dimitry Andric wrote: > On May 5, 2013, at 12:04, Luigi Rizzo wrote: > > Since svn 249959 (when NO_IDEA was removed) I cannot build HEAD on > > a somewhat recent stable/9 (see below; kernel and userland in sync) >... > > Any

copyin+copyout in one step ?

2013-05-27 Thread Luigi Rizzo
Hi, say a process P1 wants to use the kernel to copy the content of a buffer SRC (in its user address space) to a buffer DST (in the address space of another process P2), and assume that P1 issues the request to the kernel when P2 has already told the kernel where the data should go: P1

Re: copyin+copyout in one step ?

2013-05-28 Thread Luigi Rizzo
On Tue, May 28, 2013 at 6:56 AM, Zaphod Beeblebrox wrote: > On Mon, May 27, 2013 at 7:38 PM, Luigi Rizzo wrote: > >> >> say a process P1 wants to use the kernel to copy the content of a >> buffer SRC (in its user address space) to a buffer DST (in the >> address spa

copyin()/copyout() constraints ?

2013-06-12 Thread Luigi Rizzo
hi, is it possible to run copyin() or copyout() in one of these cases: 1. while holding a spinlock 2. while holding a regular mutex/lock 3. while holding a read lock (on an RWLOCK or RMLOCK) 4. while holding a write lock (on an RWLOCK or RMLOCK) I suspect #1 is forbidden, but am a bit unclear for

Re: copyin()/copyout() constraints ?

2013-06-14 Thread Luigi Rizzo
On Fri, Jun 14, 2013 at 12:07:29PM -0400, John Baldwin wrote: > On Wednesday, June 12, 2013 2:36:52 pm Alfred Perlstein wrote: > > On 6/12/13 11:01 AM, Luigi Rizzo wrote: > > > hi, > > > is it possible to run copyin() or copyout() in one of these cases: > > >

Re: copyin()/copyout() constraints ?

2013-06-15 Thread Luigi Rizzo
On Fri, Jun 14, 2013 at 02:59:57PM -0700, Alfred Perlstein wrote: > On 6/14/13 9:38 AM, Luigi Rizzo wrote: > > On Fri, Jun 14, 2013 at 12:07:29PM -0400, John Baldwin wrote: > >> On Wednesday, June 12, 2013 2:36:52 pm Alfred Perlstein wrote: > >>> On 6/12/13 11:01 AM

Re: copyin()/copyout() constraints ?

2013-06-15 Thread Luigi Rizzo
On Sat, Jun 15, 2013 at 02:31:34PM +0300, Konstantin Belousov wrote: > On Sat, Jun 15, 2013 at 01:26:10PM +0200, Luigi Rizzo wrote: > > With "indirect buffers" in netmap/vale, i can eliminate the A->B copy, > > and do A->C with a copyin in the kernel of the host. &

any need to "undo" a selrecord() ?

2013-07-26 Thread Luigi Rizzo
hi, in an attempt to simplify the locking in netmap, i would like to code the poll handler along these lines netmap_poll() { ... /* PART1 */ revents = 0; /* see if any of the rings has data */ for (i = first_ring; i < last_ring; i++) { na->

[net] protecting interfaces from races between control and data ?

2013-08-05 Thread Luigi Rizzo
i am slightly unclear of what mechanisms we use to prevent races between interface being reconfigured (up/down/multicast setting, etc, all causing reinitialization of the rx and tx rings) and i) packets from the host stack being sent out; ii) interrupts from the network card being processed. I th

Re: [net] protecting interfaces from races between control and data ?

2013-08-05 Thread Luigi Rizzo
On Mon, Aug 5, 2013 at 5:46 PM, Adrian Chadd wrote: > On 5 August 2013 07:59, Bryan Venteicher > wrote: > > > What I've done in my drivers is: > > * Lock the core mutex > > * Clear IFF_DRV_RUNNING > > * Lock/unlock each queue's lock > > .. and I think that's the only sane way of doing it.

Re: [net] protecting interfaces from races between control and data ?

2013-08-05 Thread Luigi Rizzo
On Mon, Aug 5, 2013 at 7:17 PM, Adrian Chadd wrote: > I'm travelling back to San Jose today; poke me tomorrow and I'll brain > dump what I did in ath(4) and the lessons learnt. > > The TL;DR version - you don't want to grab an extra lock in the > read/write paths as that slows things down. Reuse

Re: [net] protecting interfaces from races between control and data ?

2013-08-05 Thread Luigi Rizzo
queue lock in the control path. cheers luigi > Jack > > > > On Mon, Aug 5, 2013 at 10:36 AM, Luigi Rizzo wrote: > >> On Mon, Aug 5, 2013 at 7:17 PM, Adrian Chadd wrote: >> >> > I'm travelling back to San Jose today; poke me tomorrow and I'll brain &g

<    1   2   3   4   5   >