Re: three new netmap tools: pcap player, link emulator, load distributor

2016-02-22 Thread Luigi Rizzo
On Mon, Feb 22, 2016 at 10:16 AM, Slawa Olhovchenkov wrote: > On Mon, Feb 22, 2016 at 08:17:06AM -0800, Luigi Rizzo wrote: > >> Give this a try and let us know. > > I can't compile this. > > # cc -o lb lb.c > lb.c:17:10: fatal error: 'ctrs.h' file not

Re: three new netmap tools: pcap player, link emulator, load distributor

2016-02-22 Thread Luigi Rizzo
On Mon, Feb 22, 2016 at 3:55 PM, Slawa Olhovchenkov wrote: > On Mon, Feb 22, 2016 at 02:40:15PM -0800, Luigi Rizzo wrote: >> please try now. > > compiled, ok. > and i need wrote some apps for forwarding from pipes to output > interface? just use multiple pkt-gen in read mod

accessing a PCIe register from userspace through kmem or other ways ?

2016-03-30 Thread Luigi Rizzo
luigi -- -+--- Prof. Luigi RIZZO, ri...@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/. Universita` di Pisa TEL +39-050-2217533 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 P

Re: accessing a PCIe register from userspace through kmem or other ways ?

2016-04-01 Thread Luigi Rizzo
On Thu, Mar 31, 2016 at 11:55 PM, Ryan Stone wrote: > On Thu, Mar 31, 2016 at 4:39 PM, John Baldwin wrote: > >> On Wednesday, March 30, 2016 11:20:51 AM Jim Harris wrote: >> > On Wed, Mar 30, 2016 at 10:47 AM, Luigi Rizzo >> wrote: >> > >> > >

stall-free memory reads ? (possibly stale) ?

2016-04-08 Thread Luigi Rizzo
Hi, I have an application with two threads sharing a memory variable, one continuously writing, one continuously reading. Because of the way my system works, the reader can tolerate reading stale data, but it should not stall on memory reads (the line is on the local cache for the reader, just mig

Re: stall-free memory reads ? (possibly stale) ?

2016-04-11 Thread Luigi Rizzo
thank you, much appreciated. On Fri, Apr 8, 2016 at 11:22 PM, Slawa Olhovchenkov wrote: > On Fri, Apr 08, 2016 at 06:24:16PM +0200, Luigi Rizzo wrote: > > > Hi, > > I have an application with two threads sharing a memory variable, > > one continuously writing,

Re: CURRENT:Build Break

2016-10-16 Thread Luigi Rizzo
http://www.lerctr.org/~ler > Phone: +1 214-642-9640 E-Mail: l...@lerctr.org > US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281 > -- -----+--- Prof. Luigi RIZZO, ri...@iet.unipi.it . Dip. di Ing

best approximation of getcpu() ?

2016-12-15 Thread Luigi Rizzo
TL;DR; is there any way a userspace thread in FreeBSD can tell on which CPU it is (was) running ? I know the thread can migrate at any time but as long as the event is rare I can live with the occasionally wrong information. Linux has getcpu(2) which is exposed by glibc as sched_getcpu(3), but the

Re: best approximation of getcpu() ?

2016-12-16 Thread Luigi Rizzo
On Fri, Dec 16, 2016 at 09:29:15AM +, David Chisnall wrote: > On 16 Dec 2016, at 03:10, Alan Somers wrote: > > > > What about pthread_setaffinity(3) and friends? You can use it to pin > > a thread to a single CPU, and know that it will never migrate. > > This is not a useable solution for a

getting the cpuid for a userspace process ?

2011-10-25 Thread Luigi Rizzo
as the subject says... is there any way to get the current CPU id for a userspace process (of course, valid only at the time the function is called as the process might be arbitrarily moved while it runs) thanks luigi ___ freebsd-current@freebsd.org mail

Re: ixgbe and fast interrupts

2011-11-18 Thread Luigi Rizzo
On Fri, Nov 18, 2011 at 08:00:06AM -0500, John Baldwin wrote: > On Friday, November 18, 2011 3:46:02 am Matteo Landi wrote: > > > you probably want to be using MSI-X for a 10G NIC instead of INTx anyway. > > > > Why do you say that? Is MSI-X faster than INTx in terms of interrupt > > latency? When

Re: ixgbe and fast interrupts

2011-11-18 Thread Luigi Rizzo
On Fri, Nov 18, 2011 at 12:20:04PM -0500, John Baldwin wrote: > On Friday, November 18, 2011 12:06:15 pm Luigi Rizzo wrote: ... > > A bit more context: Matteo is looking at the latency of RPCs across > > the network involving userspace processes, and possibly using the > &

Re: ixgbe and fast interrupts

2011-11-18 Thread Luigi Rizzo
On Fri, Nov 18, 2011 at 11:16:00AM -0800, Doug Barton wrote: > On 11/18/2011 09:54, Luigi Rizzo wrote: > > One more thing (i am mentioning it here for archival purposes, > > as i keep forgetting to test it). Is entropy harvesting expensive ? > > No. It was designed to be i

Re: ixgbe and fast interrupts

2011-11-21 Thread Luigi Rizzo
On Mon, Nov 21, 2011 at 11:29:29AM -0500, John Baldwin wrote: > On Friday, November 18, 2011 5:04:58 pm Luigi Rizzo wrote: > > On Fri, Nov 18, 2011 at 11:16:00AM -0800, Doug Barton wrote: > > > On 11/18/2011 09:54, Luigi Rizzo wrote: > > > > One more thing (i am m

Re: lock order reversals with netmap

2011-12-01 Thread Luigi Rizzo
On Thu, Dec 01, 2011 at 04:44:24PM +0100, Rene Ladan wrote: > Hi, > > on FreeBSD 10.0-CURRENT #7 r228176M: Thu Dec 1 13:56:02 CET 2011 > (GENERIC + CAPABILITIES + netmap with head.diff and bge patches applied) > I get these lock order reversals when running a netmap-enabled program > (details in

datapoints on 10G throughput with TCP ?

2011-12-05 Thread Luigi Rizzo
Hi, I am trying to establish the baseline performance for 10G throughput over TCP, and would like to collect some data points. As a testing program i am using nuttcp from ports (as good as anything, i guess -- it is reasonably flexible, and if you use it in TCP with relatively large writes, the ov

Re: datapoints on 10G throughput with TCP ?

2011-12-05 Thread Luigi Rizzo
On Mon, Dec 05, 2011 at 11:15:09PM +0200, Daniel Kalchev wrote: > > On Dec 5, 2011, at 9:27 PM, Luigi Rizzo wrote: > > > - have two machines connected by a 10G link > > - on one run "nuttcp -S" > > - on the other one run "nuttcp -t -T 5 -w 128 -v the.ot

Re: datapoints on 10G throughput with TCP ?

2011-12-05 Thread Luigi Rizzo
(even reducing the CPU speed to 1.2 GHz). I can saturate the link with multiple flows (say nuttcp -N 8). cheers luigi > Jack > > > On Mon, Dec 5, 2011 at 2:28 PM, Luigi Rizzo wrote: > > > On Mon, Dec 05, 2011 at 11:15:09PM +0200, Daniel Kalchev wrote: > > > &

Re: datapoints on 10G throughput with TCP ?

2011-12-06 Thread Luigi Rizzo
On Tue, Dec 06, 2011 at 07:40:21PM +0200, Daniel Kalchev wrote: > I see significant difference between number of interrupts on the Intel and > the AMD blades. When performing a test between the Intel and AMD blades, the > Intel blade generates 20,000-35,000 interrupts, while the AMD blade generat

quick summary results with ixgbe (was Re: datapoints on 10G throughput with TCP ?

2011-12-07 Thread Luigi Rizzo
On Wed, Dec 07, 2011 at 11:59:43AM +0100, Andre Oppermann wrote: > On 06.12.2011 22:06, Luigi Rizzo wrote: ... > >Even in my experiments there is a lot of instability in the results. > >I don't know exactly where the problem is, but the high number of > >read syscal

Re: quick summary results with ixgbe (was Re: datapoints on 10G throughput with TCP ?

2011-12-07 Thread Luigi Rizzo
On Wed, Dec 07, 2011 at 09:58:31PM +0200, Daniel Kalchev wrote: > > On Dec 7, 2011, at 8:08 PM, Luigi Rizzo wrote: > > > Summary: > > > > - with default interrupt mitigation, the fastest configuration > > is with checksums enabled on both sender and receiver,

Re: quick summary results with ixgbe (was Re: datapoints on 10G throughput with TCP ?

2011-12-08 Thread Luigi Rizzo
On Thu, Dec 08, 2011 at 12:06:26PM +0200, Daniel Kalchev wrote: > > > On 07.12.11 22:23, Luigi Rizzo wrote: > > > >Sorry, forgot to mention that the above is with TSO DISABLED > >(which is not the default). TSO seems to have a very bad > >interaction with HWCSU

Re: quick summary results with ixgbe (was Re: datapoints on 10G throughput with TCP ?

2011-12-08 Thread Luigi Rizzo
On Fri, Dec 09, 2011 at 12:11:50AM +1100, Lawrence Stewart wrote: > On 12/08/11 05:08, Luigi Rizzo wrote: ... > >I ran a bunch of tests on the ixgbe (82599) using RELENG_8 (which > >seems slightly faster than HEAD) using MTU=1500 and various > >combinations of card capabil

Re: quick summary results with ixgbe (was Re: datapoints on 10G throughput with TCP ?

2011-12-08 Thread Luigi Rizzo
On Fri, Dec 09, 2011 at 01:33:04AM +0100, Andre Oppermann wrote: > On 08.12.2011 16:34, Luigi Rizzo wrote: > >On Fri, Dec 09, 2011 at 12:11:50AM +1100, Lawrence Stewart wrote: ... > >>Jeff tested the WIP patch and it *doesn't* fix the issue. I don't have > >>

Re: Idea for change to boot0

2011-12-16 Thread Luigi Rizzo
On Thu, Dec 15, 2011 at 04:21:51PM -0500, Andrew Boyer wrote: > These two changes allow you to set PXE as the default MBR boot selection, > which enables you to write a 'reboot to the network' script. We've found it > to be very useful. What do people think? seems good to me. John's comments a

cross-arch building picobsd/nanobsd images ?

2011-12-19 Thread Luigi Rizzo
Hi, recently I have tried to build picobsd image for a different architecture than the current one, with only partial success. In particular, three weeks ago i committed some changes to the picobsd script so now i can build working amd64 images on amd64. However when i try a cross build (e.g. i386

Re: [rfc] removing/conditionalising WERROR= in Makefiles

2011-12-27 Thread Luigi Rizzo
On Tue, Dec 27, 2011 at 11:27:43AM +, Alexander Best wrote: > On Tue Dec 27 11, Philip Paeps wrote: > > On 2011-12-26 10:10:40 (+), Alexander Best wrote: > > > i grep'ed through src/sys and found several places where WERROR= was set > > > in > > > order to get rid of the default -Werror s

add 'ldd' to cross-tools ?

2012-01-04 Thread Luigi Rizzo
Hi, in doing cross-builds of picobsd, i found i need a cross-version of "ldd" so i can run it on the host to detect which shared libraries are used by binaries on the target architecture (for amd64->i386 there is a partial workaround, but don't know if it works in other cases) Is there any concern

Re: add 'ldd' to cross-tools ?

2012-01-04 Thread Luigi Rizzo
On Wed, Jan 04, 2012 at 02:10:36PM -0800, Garrett Cooper wrote: > On Wed, Jan 4, 2012 at 2:23 PM, Luigi Rizzo wrote: > > Hi, > > in doing cross-builds of picobsd, i found i need a cross-version > > of "ldd" so i can run it on the host to detect which shared librar

Re: add 'ldd' to cross-tools ?

2012-01-04 Thread Luigi Rizzo
On Wed, Jan 04, 2012 at 02:30:27PM -0800, Garrett Cooper wrote: > On Wed, Jan 4, 2012 at 2:29 PM, Luigi Rizzo wrote: ... > >> $ objdump -x `which tar` | awk '$1 == "NEEDED" { print $2 }' > >> libarchive.so.5 > >> libbz2.so.4 > >> libz.so.

memory barriers in bus_dmamap_sync() ?

2012-01-10 Thread Luigi Rizzo
I was glancing through manpages and implementations of bus_dma(9) and i am a bit unclear on what this API (in particular, bus_dmamap_sync() ) does in terms of memory barriers. I see that the x86/amd64 and ia64 code only does the bounce buffers. The mips seems to do some coherency-related calls. H

Re: memory barriers in bus_dmamap_sync() ?

2012-01-10 Thread Luigi Rizzo
On Tue, Jan 10, 2012 at 01:52:49PM -0800, Adrian Chadd wrote: > On 10 January 2012 13:37, Luigi Rizzo wrote: > > I was glancing through manpages and implementations of bus_dma(9) > > and i am a bit unclear on what this API (in particular, bus_dmamap_sync() ) > > does in ter

Re: memory barriers in bus_dmamap_sync() ?

2012-01-11 Thread Luigi Rizzo
On Wed, Jan 11, 2012 at 10:05:28AM -0500, John Baldwin wrote: > On Tuesday, January 10, 2012 5:41:00 pm Luigi Rizzo wrote: > > On Tue, Jan 10, 2012 at 01:52:49PM -0800, Adrian Chadd wrote: > > > On 10 January 2012 13:37, Luigi Rizzo wrote: > > > > I was

kernel config files outside of sys/${ARCH}/conf ?

2012-01-11 Thread Luigi Rizzo
usr/sbin/config assumes that the kernel config file lives in ${src_base}/sys/${arch}/conf , which means that if you need to build a custom kernel one needs RW access to that directory. Any idea on how we can enable config to work in a generic directory ? I scanned the source code usr.sbin/config

Re: kernel config files outside of sys/${ARCH}/conf ?

2012-01-12 Thread Luigi Rizzo
On Thu, Jan 12, 2012 at 10:16:53AM +0100, Gary Jennejohn wrote: > On Thu, 12 Jan 2012 09:11:39 +0100 > Luigi Rizzo wrote: > > > usr/sbin/config assumes that the kernel config file > > lives in ${src_base}/sys/${arch}/conf , which means that > > if you need to build a

Re: kernel config files outside of sys/${ARCH}/conf ?

2012-01-12 Thread Luigi Rizzo
On Thu, Jan 12, 2012 at 01:55:39AM -0800, Garrett Cooper wrote: > On Thu, Jan 12, 2012 at 2:06 AM, Luigi Rizzo wrote: > > On Thu, Jan 12, 2012 at 10:16:53AM +0100, Gary Jennejohn wrote: > >> On Thu, 12 Jan 2012 09:11:39 +0100 > >> Luigi Rizzo wrote: > >> >

Re: kernel config files outside of sys/${ARCH}/conf ?

2012-01-12 Thread Luigi Rizzo
On Thu, Jan 12, 2012 at 12:22:50PM +0200, Aleksandr Rybalko wrote: > On Thu, 12 Jan 2012 11:17:39 +0100 > Luigi Rizzo wrote: > > >> On Thu, Jan 12, 2012 at 01:55:39AM -0800, Garrett Cooper wrote: > >> > On Thu, Jan 12, 2012 at 2:06 AM, Luigi Rizzo > >> &g

timeouts too long bug again...

2012-01-26 Thread Luigi Rizzo
In sep.2009 i noticed that usleep() select() and friends (including the in-kernel callouts) would consistently take one tick longer than they should, and committed a fix to sys/kern/kern_timeout.c to HEAD and RELENG_8 http://svnweb.freebsd.org/base?view=revision&revision=197137 http://svnweb.freeb

less aggressive contigmalloc ?

2012-08-22 Thread Luigi Rizzo
I am trying to make netmap adapt the amount of memory it allocates to what is available. At its core, it uses contigmalloc() with small chunks (even down to 1 page) to fetch memory. Problem is, i notice that before failing, contigmalloc() tries to swap out some processes (effectively killing them

TUNABLE_INT vs TUNABLE_INT_FETCH

2012-08-23 Thread Luigi Rizzo
Hi, I am a bit unclear on what are the pros and cons of using TUNABLE_INT vs TUNABLE_INT_FETCH within a device driver. As a matter of fact, as i read the definitions in sys/kernel.h I almost wonder whether we need the TUNABLE_INT form at all. can anyone help clarify the differences ? thanks luig

Re: TUNABLE_INT vs TUNABLE_INT_FETCH

2012-08-23 Thread Luigi Rizzo
On Thu, Aug 23, 2012 at 03:52:56PM +0100, Attilio Rao wrote: > On 8/23/12, Luigi Rizzo wrote: > > Hi, > > I am a bit unclear on what are the pros and cons of using > > TUNABLE_INT vs TUNABLE_INT_FETCH within a device driver. > > TUNABLE_INT is basically the "st

Re: less aggressive contigmalloc ?

2012-08-23 Thread Luigi Rizzo
On Thu, Aug 23, 2012 at 10:48:27AM -0500, Alan Cox wrote: > On Wed, Aug 22, 2012 at 7:01 AM, Luigi Rizzo wrote: > > > I am trying to make netmap adapt the amount of memory it allocates > > to what is available. At its core, it uses contigmalloc() with > > small chunks

Re: TUNABLE_INT vs TUNABLE_INT_FETCH

2012-08-23 Thread Luigi Rizzo
On Thu, Aug 23, 2012 at 04:55:05PM +0100, Attilio Rao wrote: > On Thu, Aug 23, 2012 at 5:05 PM, Luigi Rizzo wrote: > > On Thu, Aug 23, 2012 at 03:52:56PM +0100, Attilio Rao wrote: > >> On 8/23/12, Luigi Rizzo wrote: > >> > Hi, > >> > I am a bit uncl

Re: less aggressive contigmalloc ?

2012-08-23 Thread Luigi Rizzo
On Thu, Aug 23, 2012 at 12:08:40PM -0500, Alan Cox wrote: ... > >yes i do see that. > > > >Maybe less aggressive with M_NOWAIT but still kills processes. > > Are you compiling world with MALLOC_PRODUCTION? The latest version of whatever the default is. But: > jemalloc uses significantly more m

Re: less aggressive contigmalloc ?

2012-08-24 Thread Luigi Rizzo
On Fri, Aug 24, 2012 at 12:43:33AM -0500, Alan Cox wrote: > On 08/23/2012 12:45, Luigi Rizzo wrote: > >On Thu, Aug 23, 2012 at 12:08:40PM -0500, Alan Cox wrote: > >... > >>>yes i do see that. > >>> > >>>Maybe less aggressive with M_NOWAIT but stil

Re: less aggressive contigmalloc ?

2012-08-24 Thread Luigi Rizzo
On Fri, Aug 24, 2012 at 11:12:51AM -0500, Alan Cox wrote: > On 08/24/2012 09:57, Luigi Rizzo wrote: > >On Fri, Aug 24, 2012 at 12:43:33AM -0500, Alan Cox wrote: > >>On 08/23/2012 12:45, Luigi Rizzo wrote: > >>>On Thu, Aug 23, 2012 at 12:08:40PM -0500, Alan Cox wrote

Re: less aggressive contigmalloc ?

2012-08-26 Thread Luigi Rizzo
On Fri, Aug 24, 2012 at 11:56:06AM -0500, Alan Cox wrote: > On 08/24/2012 11:54, Luigi Rizzo wrote: > >On Fri, Aug 24, 2012 at 11:12:51AM -0500, Alan Cox wrote: > >>On 08/24/2012 09:57, Luigi Rizzo wrote: > >>>On Fri, Aug 24, 2012 at 12:43:33AM -0500, Alan Cox wr

per file descriptor device callbacks ?

2012-08-27 Thread Luigi Rizzo
Hi, in netmap, i am using a single name (/dev/netmap) to create multiple independent file descriptors bound to different devices/queues, and eventually I would like to mmap() each file descriptor to a different kernel memory region. This requires to track calls to open/ioctl/poll/mmap/close. The d

Re: less aggressive contigmalloc ?

2012-08-27 Thread Luigi Rizzo
On Mon, Aug 27, 2012 at 02:42:28AM -0500, Alan Cox wrote: ... > >this is dmesg when I add kdb_backtrace() at the start of vm_pageout_oom() > >The '... netmap_finalize_obj_allocator... are from my calls to > >contigmalloc, each one doing one-page allocations. > > These calls are made with M_WAITOK

Re: netmap/pkt-gen error

2012-08-28 Thread Luigi Rizzo
On Tue, Aug 28, 2012 at 06:56:07AM -0700, Khan wrote: > hi again, > i tired with v9.1RC1 but i still get the same error. > > does Netmap support Broadcom interfaces?? > the supported interfaces on man page of netmap > are em, ixgbe,re (only intel cards).. correct, netmap at the moment only suppor

Re: per file descriptor device callbacks ?

2012-08-28 Thread Luigi Rizzo
On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > The difficulty i ha

Re: per file descriptor device callbacks ?

2012-08-28 Thread Luigi Rizzo
On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: ... > > dev_clone() is rather gross and a lot harder to use than > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > of the device pager (you can't ever make mappings go away), you can > > just assign each cl

Re: per file descriptor device callbacks ?

2012-08-28 Thread Luigi Rizzo
On Wed, Aug 29, 2012 at 07:12:40AM +0300, Konstantin Belousov wrote: > On Tue, Aug 28, 2012 at 08:42:26PM +0200, Luigi Rizzo wrote: > > On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: > > ... > > > > dev_clone() is rather gross a

Re: Compiler performance tests on FreeBSD 10.0-CURRENT

2012-09-15 Thread Luigi Rizzo
On Sun, Sep 16, 2012 at 12:34:45AM +0200, Dimitry Andric wrote: > Hi all, > > By request, I performed a series of kernel performance tests on FreeBSD > 10.0-CURRENT, particularly comparing the runtime performance of GENERIC > kernels compiled by gcc 4.2.1 and by clang 3.2. the fact that the diffe

sysctl-controlled key-value store ?

2012-10-06 Thread Luigi Rizzo
Hi, in order to control some netmap feature (namely, which interfaces are attached to VALE switches), i would considering the use of a sysctl interface triggering a sysctl-proc, something of the form dev.netmap.switch.xyz=em0 ix1 dev.netmap.switch.foo=ix2 re0 where "xyz" and "foo"

Re: sysctl-controlled key-value store ?

2012-10-07 Thread Luigi Rizzo
On Sun, Oct 07, 2012 at 12:57:42PM +1300, Andrew Thompson wrote: > On 7 October 2012 06:28, Luigi Rizzo wrote: > > Hi, > > in order to control some netmap feature (namely, which interfaces > > are attached to VALE switches), i would considering the use of > > a sy

sysctl vs ifconfig vs other (was Re: sysctl-controlled key-value store ?)

2012-10-07 Thread Luigi Rizzo
[subject changed due to the shift of topic] On Sun, Oct 07, 2012 at 07:08:54AM -0700, Adrian Chadd wrote: > On 7 October 2012 03:43, Luigi Rizzo wrote: > > > > Good point, thanks for mentioning this: > > ew. ifconfig :-) > > > > > Could be done, but I cons

Re: sysctl vs ifconfig vs other (was Re: sysctl-controlled key-value store ?)

2012-10-07 Thread Luigi Rizzo
On Sun, Oct 07, 2012 at 08:23:23AM -0700, Garrett Cooper wrote: > On Sun, Oct 7, 2012 at 8:02 AM, Luigi Rizzo wrote: ... > FWIW, I don't think that the problem is necessarily the fact that one > should do it either via ioctl, kvm, sysctl, etc: having a library/set > of int

Re: sysctl vs ifconfig vs other (was Re: sysctl-controlled key-value store ?)

2012-10-07 Thread Luigi Rizzo
On Sun, Oct 07, 2012 at 01:05:21PM -0400, Justin Hibbits wrote: > On Sun, 07 Oct 2012 10:16:40 -0600 > Ian Lepore wrote: > > > On Sun, 2012-10-07 at 17:53 +0200, Luigi Rizzo wrote: > > > Access through sysctl is incredibly easy from both userspace and > > > from

Re: Dynamic Ticks/HZ

2012-11-05 Thread Luigi Rizzo
On Mon, Nov 05, 2012 at 08:11:41AM -0500, Ryan Stone wrote: > On Mon, Nov 5, 2012 at 4:40 AM, Joe Holden wrote: > > > doh, running kernel wasn't as GENERIC as I thought it was, looks like > > device polling not only breaks dynamic ticks but also reduces rx ability > > significantly, exactly 150,0

Re: Dynamic Ticks/HZ

2012-11-05 Thread Luigi Rizzo
On Mon, Nov 05, 2012 at 04:25:36PM +, Joe Holden wrote: > Luigi Rizzo wrote: > >On Mon, Nov 05, 2012 at 08:11:41AM -0500, Ryan Stone wrote: > >>On Mon, Nov 5, 2012 at 4:40 AM, Joe Holden wrote: > >> > >>>doh, running kernel wasn't as GENERIC as I th

Re: polling's future [was: Re: Dynamic Ticks/HZ]

2012-11-06 Thread Luigi Rizzo
On Tue, Nov 06, 2012 at 11:23:34AM +0100, Andre Oppermann wrote: ... > Hi Luigi, > > do you agree on polling having outlived its usefulness in the light > of interrupt moderating NIC's and SMP complications/disadvantages? yes, we should let it rest in peace. One part of the NIC-polling framework

syscall cost freebsd vs linux ?

2012-11-19 Thread Luigi Rizzo
today i was comparing the performance of some netmap-related code on FreeBSD and Linux (RELENG_9 vs 3.2) and i was surprised to see that our system calls are significantly slower. On comparable hardware (i7-2600k vs E5-1650) the syscall getppid() takes about 95ns on FreeBSD and 38ns on linux. (i m

Re: syscall cost freebsd vs linux ?

2012-11-26 Thread Luigi Rizzo
a quick and easy way is to run the syscall in a tight loop for a sufficient long time (1s or more) and use "time" to measure it. At 100ns per call you need about 10M cycles to do one second. cheers luigi On Mon, Nov 26, 2012 at 3:39 AM, Lukasz Wojcik wrote: > On 11/19/12 20:32

Fwd: new pc-bios/bios.bin breaks freebsd booting

2012-12-12 Thread Luigi Rizzo
it seems that qemu-1.3.0 is broken for freebsd... cheers luigi -- Forwarded message -- From: Luigi Rizzo Date: Wed, Dec 12, 2012 at 8:04 AM Subject: new pc-bios/bios.bin breaks freebsd booting To: qemu-de...@nongnu.org, kra...@redhat.com I am not sure if it has been reported

Re: new pc-bios/bios.bin breaks freebsd booting

2012-12-13 Thread Luigi Rizzo
. Yes, but this doesn't affect the definition of this GSI in the _PRT. It is always level/active-low for a numeric entry. Among the two conflicting choices, Linux happens to favor the MADT. FreeBSD doesn't. Paolo - End forwarded message - > > > > Ad

Re: [RFC/RFT] calloutng

2012-12-13 Thread Luigi Rizzo
be found at: http://people.freebsd.org/~davide/calloutng.diff > If noone have objections, we plan to merge the repository to HEAD in a > week or so. > > Thanks, > > Davide > ___ > freebsd-current@freebsd.org mailing list > http://lists

calloutng and dummynet (Re: [RFC/RFT] calloutng)

2012-12-17 Thread Luigi Rizzo
On Mon, Dec 17, 2012 at 10:14:29AM +0200, Alexander Motin wrote: > On 17.12.2012 05:38, Adrian Chadd wrote: ... > >Maybe hit up the altq/pf using crowd and see if they'll test this stuff > >out too? > > It would be good to test, though I know that at least dummynet is > written awful from the po

regarding r242905 ('us' argument to some callout functions) was Re: [RFC/RFT] calloutng

2012-12-17 Thread Luigi Rizzo
[addressing the various items separately] On Fri, Dec 14, 2012 at 01:57:36PM +0100, Davide Italiano wrote: > On Fri, Dec 14, 2012 at 7:41 AM, Luigi Rizzo wrote: ... > > - for several functions the only change is the name of an argument > > from "busy" to "us"

API explosion (Re: [RFC/RFT] calloutng)

2012-12-17 Thread Luigi Rizzo
[again, response to another issue i raised] On Fri, Dec 14, 2012 at 01:57:36PM +0100, Davide Italiano wrote: > On Fri, Dec 14, 2012 at 7:41 AM, Luigi Rizzo wrote: ... > > Finally, a more substantial comment: > > - a lot of functions which formerly had only a "timo" argu

Re: regarding r242905 ('us' argument to some callout functions) was Re: [RFC/RFT] calloutng

2012-12-17 Thread Luigi Rizzo
On Mon, Dec 17, 2012 at 12:17:54PM -0800, Davide Italiano wrote: > On Mon, Dec 17, 2012 at 11:27 AM, Luigi Rizzo wrote: > > [addressing the various items separately] > > > > On Fri, Dec 14, 2012 at 01:57:36PM +0100, Davide Italiano wrote: > >> On Fri, Dec 14, 2012

Re: regarding r242905 ('us' argument to some callout functions) was Re: [RFC/RFT] calloutng

2012-12-18 Thread Luigi Rizzo
On Mon, Dec 17, 2012 at 01:22:59PM -0800, Adrian Chadd wrote: > Personally, I'd rather see some consistently used units here.. bintime (or something similar) is the correct choice here. If we are concerned about the size (128 bit) then we can map it to a shorter, fixed point format, such as sign+3

Re: API explosion (Re: [RFC/RFT] calloutng)

2012-12-18 Thread Luigi Rizzo
On Mon, Dec 17, 2012 at 11:03:53PM +0200, Alexander Motin wrote: > Hi. > > > I would instead do the following: > > I also don't very like the wide API and want to hear fresh ideas, but > approaches to time measurement there are too different to do what you > are proposing. Main problem is that

Re: API explosion (Re: [RFC/RFT] calloutng)

2012-12-18 Thread Luigi Rizzo
On Tue, Dec 18, 2012 at 06:36:43PM +0100, Luigi Rizzo wrote: > On Mon, Dec 17, 2012 at 11:03:53PM +0200, Alexander Motin wrote: ... > So I believe my proposal would give large simplifications in > the code and lead to a much cleaner implementation of what > you have designed: > &

Re: API explosion (Re: [RFC/RFT] calloutng)

2012-12-18 Thread Luigi Rizzo
recision, and another 64 or 128 bit field contains the bintime. How does this look ? cheers luigi > On 18.12.2012 20:03, Alexander Motin wrote: > >On 18.12.2012 19:36, Luigi Rizzo wrote: > >>On Mon, Dec 17, 2012 at 11:03:53PM +0200, Alexander Motin wrote: > >>>>I

Re: API explosion (Re: [RFC/RFT] calloutng)

2012-12-18 Thread Luigi Rizzo
On Tue, Dec 18, 2012 at 04:27:45PM -0700, Ian Lepore wrote: > On Tue, 2012-12-18 at 23:58 +0100, Luigi Rizzo wrote: > > [top posting for readability; > > in summary we were discussing the new callout API trying to avoid > > an explosion of methods and arguments w

Re: API explosion (Re: [RFC/RFT] calloutng)

2012-12-18 Thread Luigi Rizzo
On Tue, Dec 18, 2012 at 04:37:10PM -0700, Ian Lepore wrote: > On Wed, 2012-12-19 at 00:29 +0100, Luigi Rizzo wrote: > > On Tue, Dec 18, 2012 at 04:27:45PM -0700, Ian Lepore wrote: > > > On Tue, 2012-12-18 at 23:58 +0100, Luigi Rizzo wrote: > > > > [top posting for r

Re: API explosion (Re: [RFC/RFT] calloutng)

2012-12-19 Thread Luigi Rizzo
On Wed, Dec 19, 2012 at 10:51:48AM +, Poul-Henning Kamp wrote: > > In message > > , Davide Italiano writes: > > >Right now -- the precision is specified in 'bintime', which is a binary > >number. > >It's not 32.32, it's 32.64 or 64.64 depending on the size of time_t in > >the speci

Re: API explosion (Re: [RFC/RFT] calloutng)

2012-12-19 Thread Luigi Rizzo
On Wed, Dec 19, 2012 at 7:37 AM, Poul-Henning Kamp wrote: > > In message <20121219150809.ga98...@onelab2.iet.unipi.it>, Luigi Rizzo > writes: > > >> typedef dur_t int64_t;/* signed for bug catching */ > >> #define DURSEC (

[RFC] proposed 'lem' patch to improve behaviour under emulation

2012-12-27 Thread Luigi Rizzo
This patch implements two features for the 'lem' driver that greatly improve the throughput under proper hypervisor. This is joint work with Vincenzo Maffione and Giuseppe Lettieri, I am posting it here for review, will then commit it if there are no objections. The first change is to implement

Re: [RFC] proposed 'lem' patch to improve behaviour under emulation

2012-12-27 Thread Luigi Rizzo
On Thu, Dec 27, 2012 at 02:26:44AM -0800, Garrett Cooper wrote: > On Thu, Dec 27, 2012 at 1:46 AM, Luigi Rizzo wrote: > > This patch implements two features for the 'lem' driver that > > greatly improve the throughput under proper hypervisor. > > This is joint

Re: [RFC] proposed 'lem' patch to improve behaviour under emulation

2012-12-27 Thread Luigi Rizzo
On Thu, Dec 27, 2012 at 10:46 AM, Jack Vogel wrote: > LOL, it's ironic, my intention in creating lem was to isolate the old > pre-PCIE driver from active changes so as to assure it's stability... > but virtualization comes around to bit me in the butt :) > > I guess I'm agreeable in principle wit

Re: [RFC/RFT] calloutng

2012-12-30 Thread Luigi Rizzo
On Sun, Dec 30, 2012 at 04:13:43PM -0700, Ian Lepore wrote: ... > I grabbed testsleep.c to test an arm event timer implementation, and had > to fix a couple nits... kqueueto was missing from the names[] array, and > I had to add a "* 1000" to a couple places where usec was stuffed into a > timespec

Re: [RFC/RFT] calloutng

2013-01-02 Thread Luigi Rizzo
On Mon, Dec 31, 2012 at 12:17:27PM +0200, Alexander Motin wrote: > On 31.12.2012 08:17, Luigi Rizzo wrote: > >On Sun, Dec 30, 2012 at 04:13:43PM -0700, Ian Lepore wrote: ... > >>Then I noticed you had a 12_26 patchset so I tested > >>that (after crudely fixing a couple

Re: [RFC/RFT] calloutng

2013-01-02 Thread Luigi Rizzo
On Wed, Jan 02, 2013 at 01:24:26PM +0200, Alexander Motin wrote: > On 02.01.2013 12:57, Luigi Rizzo wrote: ... > >i am not sure what you mean by "extending interval", but i believe the > >logic should be the following: > > > >- say user requests a timeout afte

Re: [RFC/RFT] calloutng

2013-01-02 Thread Luigi Rizzo
bly one way to close this discussion would be to provide a sysctl so the sysadmin can decide which point in the interval to pick when there is no suitable callout already scheduled. cheers luigi -----+--- Prof. Luigi RIZZO, ri.

Re: [RFC/RFT] calloutng

2013-01-03 Thread Luigi Rizzo
On Wed, Jan 02, 2013 at 09:52:37PM -0800, Kevin Oberman wrote: > On Wed, Jan 2, 2013 at 2:06 PM, Alexander Motin wrote: > > On 02.01.2013 18:08, Adrian Chadd wrote: > >> > >> .. I'm pretty damned sure we're going to need to enforce a "never > >> earlier than X" latency. > > > > > > Do you mean her

Re: [RFC/RFT] calloutng

2013-01-06 Thread Luigi Rizzo
On Sun, Jan 06, 2013 at 04:23:13PM +0100, Marius Strobl wrote: > On Wed, Dec 26, 2012 at 09:24:46PM +0200, Alexander Motin wrote: > > On 26.12.2012 01:21, Marius Strobl wrote: > > > On Tue, Dec 18, 2012 at 11:03:47AM +0200, Alexander Motin wrote: > > >> Experiments with dummynet shown ineffective s

Re: [RFC/RFT] calloutng

2013-01-08 Thread Luigi Rizzo
On Tue, Jan 08, 2013 at 12:55:27PM +0200, Alexander Motin wrote: > On 06.01.2013 18:20, Luigi Rizzo wrote: ... > > I think that for the time being it would be useful to run at least > > one set of tests with kern.timecounter.alloweddeviation=0 so we can > > tell how close w

__builtin_memcpy() slower than memcpy/bcopy (and on linux it is the opposite) ?

2013-01-23 Thread Luigi Rizzo
65 / 63 64 / 63 5.5 / 3.7 cheers luigi /* * Copyright (C) 2012 Luigi Rizzo. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met

Re: __builtin_memcpy() slower than memcpy/bcopy (and on linux it is the opposite) ?

2013-01-23 Thread Luigi Rizzo
On Wed, Jan 23, 2013 at 11:26 AM, Dimitry Andric wrote: > Which compilation flags did you use to test this? When I compiled your > testcase program with clang 3.2, gcc 4.2 and gcc 4.7 at -O2, with all > other settings at their defaults, all three compilers just called libc's > memcpy() for the _

Re: __builtin_memcpy() slower than memcpy/bcopy (and on linux it is the opposite) ?

2013-01-23 Thread Luigi Rizzo
On Wed, Jan 23, 2013 at 11:29 AM, Artem Belevich wrote: > On Wed, Jan 23, 2013 at 8:32 AM, Luigi Rizzo wrote: > > Probably our compiler folks have some ideas on this... > > > > When doing netmap i found that on FreeBSD memcpy/bcopy was expensive, > > __builtin_memcpy

false alarm (Re: __builtin_memcpy() slower than memcpy/bcopy (and on linux it is the opposite) ?)

2013-01-23 Thread Luigi Rizzo
On Wed, Jan 23, 2013 at 05:32:38PM +0100, Luigi Rizzo wrote: > Probably our compiler folks have some ideas on this... > > When doing netmap i found that on FreeBSD memcpy/bcopy was expensive, > __builtin_memcpy() was even worse, and so i ended up writing > my custom routine, (calle

Re: [RFC/RFT] calloutng

2013-02-16 Thread Luigi Rizzo
On Thu, Feb 14, 2013 at 11:56:54PM -0800, Alfred Perlstein wrote: > [ added Luigi Rizzo to thread ] > > > On 2/11/13 12:26 PM, Davide Italiano wrote: > > [trimmed old mails] > > > > Here's a new version of the patch: > > http://people.freebsd.or

Re: netmap error (Unable to get if info for eth1)

2013-02-18 Thread Luigi Rizzo
the > sender immediately by replying to this email. > ___ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@fr

how to cross-build a single application ?

2012-03-01 Thread Luigi Rizzo
What is the way to properly cross-build a single program (after having gone throught the 'toolchain' and possibly even a full 'buildworld') from the top-level directory of a FreeBSD source tree ? right now i do something like cd $SOURCE_ROOT make MAKEOBJDIRPREFIX=/my_obj_tree TAR

Re: how to cross-build a single application ?

2012-03-01 Thread Luigi Rizzo
On Thu, Mar 01, 2012 at 12:24:13PM -0500, Alexander Kabaev wrote: > On Thu, 1 Mar 2012 18:38:19 +0100 > Luigi Rizzo wrote: > > > What is the way to properly cross-build a single program > > (after having gone throught the 'toolchain' and possibly > > even a

strange ping response times...

2012-04-10 Thread Luigi Rizzo
I noticed this first on a 10G interface, but now there seems to be a similar issue on the loopback. Apparently a ping -f has a much lower RTT than one with non-zero delay between transmissions. Part of the story could be that the flood version invokes a non-blocking select. On the other hand, ping

Re: strange ping response times...

2012-04-10 Thread Luigi Rizzo
gi > On Tue, Apr 10, 2012 at 03:40:27PM -0700, Julian Elischer wrote: > > On 4/10/12 3:52 PM, Luigi Rizzo wrote: > > > I noticed this first on a 10G interface, but now there seems > > > to be a similar issue on the loopback. > > > > > > Apparently

Re: strange ping response times...

2012-04-11 Thread Luigi Rizzo
On Wed, Apr 11, 2012 at 12:09:48AM -0400, Jason Hellenthal wrote: > ... > > Apparently a ping -f has a much lower RTT than one with non-zero > > delay between transmissions. Part of the story could be that > > the flood version invokes a non-blocking select. > > On the other hand, pinging on the l

<    1   2   3   4   5   >