Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jun 2013 20:00:16 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Supermicro 6027R-N3RF+head, usb trouble
Message-ID:  <20130601170016.GU3047@kib.kiev.ua>
In-Reply-To: <51A742EB.6070907@FreeBSD.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--ycbhuq+KTgWRWYKC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 bios?
> >>>>>> Also I can't boot that box from usb memstick and
> >>>>>> FreeBSD-10.0-CURRENT-amd64-20130413-r249439-release.iso They both
> >>>>>> loose(?) device and can't find root If I disable controller in bios
> >>>>>> 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 dhcpd,
> >>>>>> tftp, nfs on my laptop and finally I install fbsd on that box, but
> >>>>>> 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-RELEASE
> >>>>> (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.
> >>
> >>
> >>>> 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 boot,=
 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.
> >>>
> >>> 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.
> >>>
> >=20
> > Could you get the values of sysctl kern.nbuf, kern.bio_transient_maxcnt
> > from the boot without any tuning of the KVA usage ?
> >=20
>=20
> # sysctl kern.nbuf kern.bio_transient_maxcnt kern.maxbcache
> kern.nbuf: 472300
> kern.bio_transient_maxcnt: 1024
> kern.maxbcache: 0
>=20
> For reference, with limiting maxbcache:
>=20
> # sysctl kern.nbuf kern.bio_transient_maxcnt kern.maxbcache
> kern.nbuf: 7372
> kern.bio_transient_maxcnt: 102
> kern.maxbcache: 134217728

You did not tuned BKVASIZE nor MAXPHYS ?

This is somewhat unexpected, but indeed reasonable.  The buffer cache
dutifully tried to allocate 1/10 of the RAM size for the buffer KVA.

Please try the following tweak.

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_est)
 			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;

--ycbhuq+KTgWRWYKC
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iQIcBAEBAgAGBQJRqiifAAoJEJDCuSvBvK1BDMsQAJ2iNDZJgHjlKi2y2x54RPVg
aOvQzGe0pMOM/sh4MkDz0HQZ/dCPEux4XjoS5t7pOMWfSfNdeyScXofBZ+y61+N0
894EA0OkUAsQHCUZ60TCeOuUYfKDUSjhmnZxdWtBrGoaM7JlJkH/h5rMUnwcLPit
i/hG+P8EmgZ+q5TLjZBi/LKwlbGFiimMggGboBDSW4mVRvZEQo9rSRwZPTSn7EmN
4Z9UuAFH9m2tzQHRRDMot4NGWo4Um/g/R7za7In/unfNO5Bn/zhiv5YHKBReDifv
wX1xWdlJ0WWCkVRAojOmUfmgPHsE8JHyNZa+Imu7bDv6SDlj95myfRPbEX/2uBz4
NY17kwBuPcsws8CGJOU2f0zt3vBPzHmq8/H10pldoULzo1f7bB/VQ7ej+uYxSTVh
pN+we8xOrvJ7/JsMurFcHO/rzBMEa5W0/E/pv2cIbP/i+H5P6F7l4Y4u8CiOMJes
Q5QqgPyU1pJFi8flyzJs/vAjXA74jSwerNlvwNG35sWi9RSfMJ6NuCtPzBC+vC4P
NfmjNUOajq0cusBBWAnAno+ZKQDBWWeThT98WQHnk17Wflxt2USFax64Z4WTeAmH
ZP8yUqDChH1uNEgFo37GYLZM/yu35KGMeG8Z1Pka0XZmECFDA5bDqYtU4MTmVgQW
kt+h4HQFtgcE8v+XEP76
=JsTE
-----END PGP SIGNATURE-----

--ycbhuq+KTgWRWYKC--



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