Re: 82576 + NETMAP + VLAN

2016-02-11 Thread Giuseppe Lettieri

Il 10/02/2016 14:53, Slawa Olhovchenkov ha scritto:

On Wed, Feb 10, 2016 at 02:33:20PM +0100, Giuseppe Lettieri wrote:


Il 10/02/2016 12:59, Slawa Olhovchenkov ha scritto:

Can you look also on second issue?

PS: What need from me? May be open PR?


May you provide some example code that triggers the issue?


This is about 700 lines of code (not very clear), may be I can describe it?


I just need some code to trigger the problem locally. Don't worry about 
the clarity and the line count, unless you cannot share the code for 
other reasons.


Cheers,
Giuseppe


First: this is thread code. I think it impotant point.
All sync with netmap go throw kevent() interface.

Main thread got information about two NIC (determine number of rings)
and spawn 1 balancer thread and NCPU worker thread.
All thread pinned to cores.

Balancer thread open all rings on both NIC separate (i.e. open 6+6
NETMAP fds for hardware rings) and allocate on first NIC and open
NCPU*2 master NETMAP pipes.
All fds register in kevent for read event as

EV_SET(kp, fd, EVFILT_READ, EV_ADD | EV_ENABLE | EV_CLEAR, 0, 0, kidx);

and for future write event as

EV_SET(kp, fd, EVFILT_WRITE, EV_ADD  | EV_DISABLE, 0, 0, 0);

after write occur next event will be added:

EV_SET(kp, fd, EVFILT_WRITE, EV_ADD | EV_DISPATCH, 0, 0, 0);

Each worker thread open two slave NETMAP pipes in same maner as above.

Balancer got packet from inside hardware ring, dispatch (zero-copy) to inside 
master pipe.
Worker got packet from inside slave pipe and zero-copy to outside slave pipe.
Balancer got  packet from outside master pipe and dispatch (zero-copy) to 
outside hardware ring.
And vise versa.

After program start I have deadlock instantly (with WITNESS enabled kernel).
W/o WITNESS deadloc occur only under load.

W/o EV_DISABLE/EV_DISPATCH NETAMP don't see output packets.
NETMAP don't forward incoming packet to program when open and attach to NETMAP 
do in main thread.




--
Dr. Ing. Giuseppe Lettieri
Dipartimento di Ingegneria della Informazione
Universita' di Pisa
Largo Lucio Lazzarino 1, 56122 Pisa - Italy
Ph. : (+39) 050-2217.649 (direct) .599 (switch)
Fax : (+39) 050-2217.600
e-mail: g.letti...@iet.unipi.it
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


cooperation

2016-02-11 Thread Marcin Tomziński
 
Are you looking for a new automotive parts brand to be different from your competitors? 
Do you want to be a direct importer? 
Are you looking for high quality products at fair and individual quotation? 
Fed up with late deliveries and low availability from the stock? 
Do you want to join young and effective organisation? 
Do you need fast orders handling and flexibility in market approach?

We have a great proposal for your business!



 




Our products range consists of more than 1500 references under 4 brands



- VASCO FILTERS (oil, fuel air and cabin filters)

- FLUXAR FILTERS (red line)

- PEXA WIPERS (universal and dedicated sets of wipers)

- BREYKO (brake pads) 




We are expanding our business in your country and looking for direct importers. 




Join our Team!  More info on web page: www.vascofilters.com or facebook   



If you have any questions do not hesitate to contact us, we speak English, 
French and Spanish.




Marketing and Operations Manager

Olaf Tomziński





If you do not wish to receive further information.



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


Re: 82576 + NETMAP + VLAN

2016-02-11 Thread Slawa Olhovchenkov
On Thu, Feb 11, 2016 at 10:11:59AM +0100, Giuseppe Lettieri wrote:

> Il 10/02/2016 14:53, Slawa Olhovchenkov ha scritto:
> > On Wed, Feb 10, 2016 at 02:33:20PM +0100, Giuseppe Lettieri wrote:
> >
> >> Il 10/02/2016 12:59, Slawa Olhovchenkov ha scritto:
> >>> Can you look also on second issue?
> >>>
> >>> PS: What need from me? May be open PR?
> >>
> >> May you provide some example code that triggers the issue?
> >
> > This is about 700 lines of code (not very clear), may be I can describe it?
> 
> I just need some code to trigger the problem locally. Don't worry about 
> the clarity and the line count, unless you cannot share the code for 
> other reasons.

I am attach source.
run as "prog if1 if2"
Got `acquiring duplicate lock of same type: "nm_kn_lock"` immediatly
after start.
Dead locking may be occur immediatly after start or may be need
traffic flooding.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


passwd and pw speed regression?

2016-02-11 Thread Mike Tancsa
I noticed that on a new RELENG_10 box we are building, password updates
are taking a very long time to build.  On the old RELENG_8 box, doing
something simple like adding a user

# time pw useradd test12345
0.062u 0.063s 0:00.14 85.7% 54+988k 196+134io 0pf+0w

# time pw userdel test12345
0.164u 0.044s 0:00.20 100.0%28+1181k 0+18io 0pf+0w


On the new RELENG_10 box,

# time pw useradd test12345
0.060u 0.120s 0:58.89 0.3%  58+146k 12+6485io 0pf+0w

# time pw userdel test12345
0.125u 0.133s 0:58.80 0.4% 46+214k 13+9326io 0pf+0w


# wc /etc/passwd
6113   14792  376128 /etc/passwd


Yes, almost 60 seconds to add a user to the password file?

Does anyone know what is going on to account for the large difference
and how to work around it ?  I am guessing

https://svnweb.freebsd.org/base?view=revision&revision=285205

is the issue. Apart from keeping local source code changes, is there not
a better way to not have reasonable speeds ?

---Mike



-- 
---
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: passwd and pw speed regression?

2016-02-11 Thread Stefan Esser
Am 11.02.2016 um 16:02 schrieb Mike Tancsa:
> I noticed that on a new RELENG_10 box we are building, password updates
> are taking a very long time to build.  On the old RELENG_8 box, doing
> something simple like adding a user
> 
> # time pw useradd test12345
> 0.062u 0.063s 0:00.14 85.7% 54+988k 196+134io 0pf+0w
> 
> # time pw userdel test12345
> 0.164u 0.044s 0:00.20 100.0%28+1181k 0+18io 0pf+0w
> 
> 
> On the new RELENG_10 box,
> 
> # time pw useradd test12345
> 0.060u 0.120s 0:58.89 0.3%  58+146k 12+6485io 0pf+0w
> 
> # time pw userdel test12345
> 0.125u 0.133s 0:58.80 0.4% 46+214k 13+9326io 0pf+0w
> 
> 
> # wc /etc/passwd
> 6113   14792  376128 /etc/passwd
> 
> 
> Yes, almost 60 seconds to add a user to the password file?
> 
> Does anyone know what is going on to account for the large difference
> and how to work around it ?  I am guessing

You are affected by the problem mentioned in

https://reviews.freebsd.org/D5186

The output file is written with O_SYNC a record at a time
and this is slow (100 to 200 records per second on a non-SSD
drive).

This will be fixed in -CURRENT soon and I think the fix
should qualify for inclusion in the next 10-BETA, thereafter.

Regards, STefan

> https://svnweb.freebsd.org/base?view=revision&revision=285205
> 
> is the issue. Apart from keeping local source code changes, is there not
> a better way to not have reasonable speeds ?
> 
>   ---Mike

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


10.2 Release - no core dump found after crash

2016-02-11 Thread Scott Otis
Been trying to get a FreeBSD VM server running on Azure on a "Standard DS" size 
VM (so I have access to SSD storage for PostgreSQL).  The "Standard DS" series 
of VMs also have faster/newer CPUs than the original "Standard A" series of 
VMs.  I am using the image of FreeBSD from here: 
https://vmdepot.msopentech.com/Vhd/Show?vhdId=56718&version=61117 .  After 
setting up the VM it started rebooting every hour or so.  Initially I thought 
this was an Azure issue and Azure was forcibly rebooting the VM because it 
wasn't getting health reports back.  But I don't' believe this is the case 
anymore and I think FreeBSD is crashing.  (Note: I have setup a FreeBSD VM with 
a "Standard A" series VM and that seems to be running fine - though it looks 
like it might have crashed after about 38 hours which is much better than 
crashing after 1 hour).

Here is the "last" log from the last two days:

[--redacted--]   pts/2[--redacted--] Fri Feb  5 21:10   still logged in
[--redacted--]   pts/1[--redacted--] Fri Feb  5 21:10   still logged in
[--redacted--]   pts/0[--redacted--] Fri Feb  5 20:58 - 21:10  (00:12)
boot time  Fri Feb  5 20:53
[--redacted--]   pts/1[--redacted--] Fri Feb  5 04:59 - crash  (15:54)
[--redacted--]   pts/0[--redacted--] Fri Feb  5 04:59 - 04:59  (00:00)
boot time  Fri Feb  5 04:41
boot time  Fri Feb  5 02:16
[--redacted--]   pts/1[--redacted--] Fri Feb  5 00:36 - crash  (01:40)
[--redacted--]   pts/0[--redacted--] Fri Feb  5 00:36 - 00:36  (00:00)
boot time  Fri Feb  5 00:29
shutdown time  Thu Feb  4 09:33
boot time  Thu Feb  4 08:47
[--redacted--]   pts/0[--redacted--] Thu Feb  4 07:25 - crash  (01:21)
boot time  Thu Feb  4 07:00
boot time  Thu Feb  4 05:03
boot time  Thu Feb  4 02:45
[--redacted--]   pts/0[--redacted--] Thu Feb  4 01:08 - crash  (01:36)
boot time  Thu Feb  4 00:58

There are boot times without previous shutdown times - and there is that 
"crash" text (which is why I'm thinking it is a crash).

I added this to /etc/rc.conf:

dumpdev="AUTO"
dumpdir="/var/crash"

Here is the info on the swapfile:

sudo swapinfo -h
Device  512-blocks UsedAvail Capacity
/dev/gpt/swapfs2097152   0B 1.0G 0%

Server has 3.5 GB of RAM.

Here is the boot log after a crash (says there are no core dumps found... any 
way to figure out why it is not dumping the core?):

-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/[H[J-\|/-\
 [7;46H ````[8;46Hs` `.---...--.```   
-/[9;46H+o   .--` /y:`  +.[10;46H yo`:.:o  
`+-[11;46H  y/   -/`   -o/[12;46H .-  
::/sy+:.[13;46H / `--  /[14;46H`:  
:`[15;46H`:  :`[16;46H /  
/[17;46H .--.[18;46H  --  -.[19;46H 
  `:`  `:`[20;46H .-- `--.[21;46H
.---..|/-\ [1;2H __      _ _  [2;2H|  
| |  _ \ / |  __ \ [3;2H| |___ _ __ ___  ___ | |_) | (___ | 
|  | |[4;2H|  ___| '__/ _ \/ _ \|  _ < \___ \| |  | |[5;2H| |   | | |  __/  
__/| |_) |) | |__| |[6;2H| |   | | |||| |  |  |[7;2H|_| 
  |_|  \___
 |\___||/|_/|_/ 
[10;2H|[11;2H|[12;2H|[13;2H|[14;2H|[15;2H|[16;2H|[17;2H|[18;2H|[19;2H|[20;2H|[21;2H|[10;44H|[11;44H|[12;44H|[13;44H|[14;44H|[15;44H|[16;44H|[17;44H|[18;44H|[19;44H|[20;44H|[21;44H|[9;3H=[22;3H=[9;2H+[22;2H+[9;44H+[22;44H+[25;0H|/-\|/-\|/-\|/[9;15HWelcome
 to FreeBSD[11;5H1 [11;6H.[11;8HBoot Multi User [Enter][12;5H2 
[12;6H.[12;8HBoot [S]ingle User[13;5H3 [13;6H.[13;8H[Esc]ape to loader 
prompt[14;5H4 [14;6H.[14;8HReboot[16;5HOptions:[17;5H5 [17;6H.[17;8H[K]ernel: 
kernel (1 of 2)[18;5H6 [18;6H.[18;8HConfigure Boot 
[O]ptions...[25;0H[23;4HAutoboot in 9 seconds. [Space] to 
pause[25;0H[23;4HAutoboot in 8 seconds. [Space] to pause[25;0H[23;4HAutoboot in 
7 seconds. [Space] to pause[25;0H[23;4HAutoboot in 6 seconds. [Space] to 
pause[25;0H[23;4HAutoboot in 5 seconds. [Space] to pause[25;0H[23;4HAutoboot in 
4 seconds. [Space] to pause[25;0H[23;4HAutoboot in 3 seconds. [Space
 ] to pause[25;0H[23;4HAutoboot in 2 seconds. [Space] to 
pause[25;0H[23;4HAutoboot in 1 seconds. [Space] to pause[25;0H[23;4H
   
[25;0H-\|/-\|/-\|/-\|/-\|/-\|/-\|//boot/kernel/kernel
 text=0xfc8de8 
-\|/-\|/-