Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2016 21:18:08 +0300
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        Adrian Chadd <adrian@freebsd.org>, "Robert N. M. Watson" <rwatson@freebsd.org>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: svn commit: r304313 - head/sys/net
Message-ID:  <16924228-a88c-4d6e-0d51-fedcbec1594d@FreeBSD.org>
In-Reply-To: <CAJ-VmokrNfoJNBoa7iUv0FhQyajAZz2BM7VzaGDu3KVUTmCWUA@mail.gmail.com>
References:  <201608172021.u7HKLXJ4001584@repo.freebsd.org> <CAJ-Vmonu3ZSKZtZZMa68FAS9nDdiriE3iv81cjoW%2Bk3mHKO2=g@mail.gmail.com> <28FA9F29-FA29-4547-875D-0734DA120636@FreeBSD.org> <CAJ-VmokrNfoJNBoa7iUv0FhQyajAZz2BM7VzaGDu3KVUTmCWUA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--xWfcuEjsaLAh3S7Js3GpIK5BUD5oO6eRu
Content-Type: multipart/mixed; boundary="2dnJljW57eP1BrPApK1fSenC2Wa0Px8Dk"
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
To: Adrian Chadd <adrian@freebsd.org>,
 "Robert N. M. Watson" <rwatson@freebsd.org>
Cc: FreeBSD Net <freebsd-net@freebsd.org>
Message-ID: <16924228-a88c-4d6e-0d51-fedcbec1594d@FreeBSD.org>
Subject: Re: svn commit: r304313 - head/sys/net
References: <201608172021.u7HKLXJ4001584@repo.freebsd.org>
 <CAJ-Vmonu3ZSKZtZZMa68FAS9nDdiriE3iv81cjoW+k3mHKO2=g@mail.gmail.com>
 <28FA9F29-FA29-4547-875D-0734DA120636@FreeBSD.org>
 <CAJ-VmokrNfoJNBoa7iUv0FhQyajAZz2BM7VzaGDu3KVUTmCWUA@mail.gmail.com>
In-Reply-To: <CAJ-VmokrNfoJNBoa7iUv0FhQyajAZz2BM7VzaGDu3KVUTmCWUA@mail.gmail.com>

--2dnJljW57eP1BrPApK1fSenC2Wa0Px8Dk
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 21.08.16 20:33, Adrian Chadd wrote:
>> Does this make sense?
>=20
> Right. Let me go and look into it a little more. I think we may want=20
> to revert the change (which just landed to -11, so maybe revert that=20
> too) so I can test both of them out for correctness.
>=20
> Andrey, I'm sorry for suggesting we back it out, but I'd like to
> make sure we don't break networking on 11. :) Is that okay? I will
> look at this tonight/tomorrow.

Hi,

I already wanted to merge it into releneg/11.0.

=46rom my point of view it can't change anything that worked before.
1. With default config (nws_count =3D 1) we use only first value from
nws_array as cpuid.

 782         /*
 783          * In the event we have only one worker, shortcut and
deliver to it
 784          * without further ado.
 785          */
 786         if (nws_count =3D=3D 1) {
 787                 *cpuidp =3D nws_array[0];
 788                 return (m);
 789         }

2. When we have nws_count equal to mp_ncpus, nws_array will contain the
same cpuid values, so *cpuidp =3D=3D nws_array[*cpuidp % nws_count]. And
curcpu =3D=3D nws_array[curcpu % nws_count];

3. When we have nws_count lower than mp_ncpus - it just panics.
And this commit fixes such panics. The only uncertain case is when
np_m2cpuid() returns NETISR_CPUID_NONE. In this case with
NETISR_DISPATCH_HYBRID we can get deferred dispatch due to curcpu
doesn't have netisr worker.

I think we can keep this in the release, but if you have an idea how to
improve it - just do it and then do MFC.

--=20
WBR, Andrey V. Elsukov


--2dnJljW57eP1BrPApK1fSenC2Wa0Px8Dk--

--xWfcuEjsaLAh3S7Js3GpIK5BUD5oO6eRu
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEsBAEBCAAWBQJXufBgDxxhZUBmcmVlYnNkLm9yZwAKCRABxeoEEMihenDECACL
hAqjc6CMoZUZwxGs+34akG8xzIt9OZopsIkIXMHHW2gG30CVXH2cppivtaxv+o41
HyR302PnaeyTE3iRryKQOyzZ3sB+6NWFNrgG84BnkdBVaXTyYdoq36emzPw5Zbji
m2VxkTNwXTXpPLiH5U/xL+YyMx724QLC33dRbt6USTUTeBAxM2EpW741g/dfB6W0
/wrbwH/KapVAo9ceIXBIlUr+XYWo+iRk8Mwdj7GwoVl526zHs5SJlKqsMJLPGT4e
2TBn7VR7SwvCOnkGiQrGCmM+L2uIuQ7k0nUzaS1/GOiX41bX3DxkkXkjmSHxBqMx
0/FI0c0Nz7OtOfbc1ZjM
=gNzd
-----END PGP SIGNATURE-----

--xWfcuEjsaLAh3S7Js3GpIK5BUD5oO6eRu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16924228-a88c-4d6e-0d51-fedcbec1594d>