Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Jun 2013 08:33:56 -0500
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Supermicro 6027R-N3RF+head, usb trouble
Message-ID:  <51AB49C4.5030000@FreeBSD.org>
In-Reply-To: <20130601170016.GU3047@kib.kiev.ua>
References:  <20130421223838.6bec3bfb@laptop.minsk.domain> <51A4F585.60401@FreeBSD.org> <20130529083338.07a2f54b@laptop.minsk.domain> <51A5F1AC.3060606@FreeBSD.org> <51A5F873.2000103@FreeBSD.org> <20130530050723.GW3047@kib.kiev.ua> <51A742EB.6070907@FreeBSD.org> <20130601170016.GU3047@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2BKHSQGDFOBFINRDCPGSX
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 6/1/2013 12:00 PM, Konstantin Belousov wrote:
> On Thu, May 30, 2013 at 07:15:39AM -0500, Bryan Drewery wrote:
>> On 5/30/2013 12:07 AM, Konstantin Belousov wrote:
>>> On Wed, May 29, 2013 at 07:45:39AM -0500, Bryan Drewery wrote:
>>>> On 5/29/2013 7:16 AM, Bryan Drewery wrote:
>>>>> On 5/29/2013 12:33 AM, Sergey V. Dyatko wrote:
>>>>>> On Tue, 28 May 2013 13:20:53 -0500
>>>>>> Bryan Drewery <bdrewery@FreeBSD.org> wrote:
>>>>>>
>>>>>>> On 4/21/2013 2:38 PM, Sergey V. Dyatko wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Can anybody explain why USB keyboard (and keyboard from
>>>>>>>> integrated IPKVM) doesn't work when I boot with   'C606
>>>>>>>> chipset Dual 4-Port SATA/SAS Storage Control Unit' enabled in bi=
os?
>>>>>>>> Also I can't boot that box from usb memstick and
>>>>>>>> FreeBSD-10.0-CURRENT-amd64-20130413-r249439-release.iso They bot=
h
>>>>>>>> loose(?) device and can't find root If I disable controller in b=
ios
>>>>>>>> system can't see any sata hdd connected to it:(
>>>>>>>> booting with hw.usb.ehci.no_hs=3D1, kern.cam.boot_delay=3D"10000=
"
>>>>>>>> and debug.acpi.disabled=3D"hostres" without success. I setup dhc=
pd,
>>>>>>>> tftp, nfs on my laptop and finally I install fbsd on that box, b=
ut
>>>>>>>> question with kbd is open - It doesn't work..
>>>>>>>> dmesg:
>>>>>>>> http://svn.freebsd.by/files/dmesg_N3RF.txt
>>>>>>>> pciconf -lv:
>>>>>>>> http://svn.freebsd.by/files/pciconf_N3RF.txt
>>>>>>>>
>>>>>>>> I would appreciate any hints
>>>>>>>>
>>>>>>>
>>>>>>> I'm having this exact problem on HEAD r250991 as well. 9.1-RELEAS=
E
>>>>>>> (disc1) seems ok though.
>>>>>>>
>>>>>>> Did you get this figured out?
>>>>>>>
>>>>>>
>>>>>> I added to loader.conf
>>>>>> kern.maxbcache=3D"128M"
>>>>
>>>> ^ This setting is all that was needed. The VFS change was not needed=
=2E
>>>>
>>>>
>>>>>> vfs.maxbufspace=3D134217728
>>>>>> also I create /boot.config with '-v'
>>>>>> I don't know what exactly help, but now usb kbd (ipkvm) works fine=

>>>>>> for me.
>>>>>> p.s. It is smbios.system.product=3D"X9DRW"
>>>>>>
>>>>>
>>>>> Yes! This fix of limiting the size worked for me. USB worked on boo=
t, kb
>>>>> works remotely in the IP KVM and locally as well now.
>>>>>
>>>>> For the record, this is a DELL C1100 with 72GB of ram. The symptoms=

>>>>> match the previous posts though and the delay settings did not help=
=2E
>>>>>
>>>>> This was working on 9.1-R, something must have changed on HEAD.
>>>>>
>>>>> This is not a production system, I'm willing to try any patches or
>>>>> settings to help get this fixed by default.
>>>>>
>>>
>>> Could you get the values of sysctl kern.nbuf, kern.bio_transient_maxc=
nt
>>> from the boot without any tuning of the KVA usage ?
>>>
>>
>> # sysctl kern.nbuf kern.bio_transient_maxcnt kern.maxbcache
>> kern.nbuf: 472300
>> kern.bio_transient_maxcnt: 1024
>> kern.maxbcache: 0
>>
>> For reference, with limiting maxbcache:
>>
>> # sysctl kern.nbuf kern.bio_transient_maxcnt kern.maxbcache
>> kern.nbuf: 7372
>> kern.bio_transient_maxcnt: 102
>> kern.maxbcache: 134217728
>=20
> You did not tuned BKVASIZE nor MAXPHYS ?

No.

>=20
> This is somewhat unexpected, but indeed reasonable.  The buffer cache
> dutifully tried to allocate 1/10 of the RAM size for the buffer KVA.
>=20
> Please try the following tweak.

With patch, and leaving kern.maxbcache to default, USB works as expected.=


Result with patch:

# sysctl kern.nbuf kern.bio_transient_maxcnt kern.maxbcache
kern.nbuf: 105931
kern.bio_transient_maxcnt: 1024
kern.maxbcache: 0

# cat /boot/loader.conf
zfs_load=3D"YES"
vfs.root.mountfrom=3D"zfs:zroot/ROOT/head-r251224"

USB on boot:

uhub0: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
uhub5: 2 ports with 2 removable, self powered
uhub6: 2 ports with 2 removable, self powered
Root mount waiting for: usbus7 usbus3
Root mount waiting for: usbus7 usbus3
Root mount waiting for: usbus7 usbus3
uhub4: 6 ports with 6 removable, self powered
uhub7: 6 ports with 6 removable, self powered
ugen3.2: <Avocent> at usbus3
ukbd0: <Keyboard> on usbus3
kbd2 at ukbd0
Trying to mount root from zfs:zroot/ROOT/head-r251224 []...
ums0: <Mouse> on usbus3
ums0: 3 buttons and [Z] coordinates ID=3D0
ums1: <Mouse REL> on usbus3
ums1: 3 buttons and [XYZ] coordinates ID=3D0


>=20
> diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
> index 7bd8d7e..2f92cde 100644
> --- a/sys/kern/vfs_bio.c
> +++ b/sys/kern/vfs_bio.c
> @@ -560,7 +560,8 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_e=
st)
>  			nbuf +=3D min((physmem_est - 4096) / factor,
>  			    65536 / factor);
>  		if (physmem_est > 65536)
> -			nbuf +=3D (physmem_est - 65536) * 2 / (factor * 5);
> +			nbuf +=3D min((physmem_est - 65536) * 2 / (factor * 5),
> +			    32 * 1024 * 1024 / (factor * 5));
> =20
>  		if (maxbcache && nbuf > maxbcache / BKVASIZE)
>  			nbuf =3D maxbcache / BKVASIZE;
>=20


--=20
Regards,
Bryan Drewery


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRq0nEAAoJEG54KsA8mwz5YSEP/j7LY9Bqxc0svachqIsmcq5x
HI9IT9/DecHVN0fGTesG63OxOXp+wMPYbqkwFFo2IzogrR5iw+zpRtFDva44W4qs
G3tczG4QXJepft0+cFwdRmBu8UF5uQzmYALQv7BgE8JIe34JVGi/OrQipva48SNO
yf0T+rIhr+C8BuKCaO1o94kIYwF9ovMcvAClR9PVAsQhxEwmsN+Nc+mrvzZTS4Yk
n56lTsZkyI+s17M6MgQEbCMWzmXjO3+HDQSDTU7jxMJnUdXEJsQ6ur5g9rPCMaLZ
MZeVZhXb3XkNG5JXJ2edE6hQjYcNJhgI5bF6coSQDSf8pALzLLkKC+4rKGFxgm5U
0pPrK4a9oMCjDCqS+VeQAtnoeYr2i2rfe3iLU+fPgzL7C+sI4ld+VeU+FkMgY2NV
16Plvvlg3l47vecfPf7DhHBV3f1zZvyjp7EMONhK0XsjhxWAjXGRXqhG4gv4a9MM
G6i+lBdR854PRbpu+7x+3Om8g3ZpzpR7BmNgH4MQTLXj3DnsvNMGETVM6WAVSawQ
qpYIa6IJhSLZSCudqEoJeaNp1mzTsCya7R6sUfd8S5+VVcR6lIJp/yrXDyWdy6Sj
9MTKdYgHfzO5iTIcv4MoV+Ha4kvAmxEckiGcjT5DVe/mnEJKL2/NZA5qVx6MjYFq
s63IUfGQLReAxJh9tcva
=8urF
-----END PGP SIGNATURE-----

------enig2BKHSQGDFOBFINRDCPGSX--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51AB49C4.5030000>