From owner-svn-src-head@freebsd.org Sun Jun 18 12:30:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EF30D9096D; Sun, 18 Jun 2017 12:30:31 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670069.outbound.protection.outlook.com [40.107.67.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B42F6E726; Sun, 18 Jun 2017 12:30:30 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Sun, 18 Jun 2017 12:30:28 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.1178.018; Sun, 18 Jun 2017 12:30:28 +0000 From: Rick Macklem To: Rick Macklem , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , "meloun.michal@gmail.com" Subject: Re: svn commit: r320062 - in head/sys: fs/nfs fs/nfsclient kern sys Thread-Topic: svn commit: r320062 - in head/sys: fs/nfs fs/nfsclient kern sys Thread-Index: AQHS6ALSR0VrzKO2dE6NnsIkbEp8zqIqjQuE Date: Sun, 18 Jun 2017 12:30:28 +0000 Message-ID: References: <201706172224.v5HMOJoV090858@repo.freebsd.org>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=none action=none header.from=uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTXPR01MB0189; 7:DPaIROHuULC0iwd6eSsClJUFS8CzxemkOGe/o0amjsPLBqhvSfBfU3em6GgnfzMRMc/rmWhm4XRL/KCwVTEvu1GrC21cCR4UrZsqZUAN+E1KtzLdKZOzGT45RcavskB8tvLsCduS+RZXGcyz90RjIQhHjtrLnneB+3bAU1bUm63SeDvN1W6FUc5exPpFbVTvM3mKB3volV33TcPoU2MO7jtHG15YakVRW/VOghBlq3mFrArX2KWlWahkvEgVym/KUGt7XRIlWlJl9Qc7I7mzHtlhezPifDthCnXMvsPXri2IN6piqwuc/VKkyRpv5sXPWHcMQ8N4PJ/5eWUmxNwBa9aRaZL2K72h9ivBRgM0CKWywQE6mXP7v2l+6HLd4cCNaRsPO+epH80Q+Ecb5SRLENK4SGqLuKfwtlTOCfqjzUfpyNLwAgEVhL11egwF6az8ZbYehMlsppVO+Yh2Jwz8A9coFj/pPc8jpS5+sLgpFzHuh74Cs7EGCTqu1Goq0mVT0Bfwbwlm/zfTF1RVGCeKac58JcqtxoQibMOa2MRH45IOp1lY1/Yr183ZduCerlj39j6Z1zl079QviO2cjApDlVB26eCyPEaIu8o1ad1xHCWLAb7AklCFejTacVh0b4BA5EUsbQWI1rCgdTVVD4SFp1dHbzSjId5AcxfEv1f3bL6rEwSvOtkbQ9TGKeL3tFd1aMwC/jk1qK5bUN0xQoZ3/f8v6/+YqjFwI4/yHfdmIqS7XEIhNr1IVri98JZxP4YBPbgi+QGG8o/i9qwo4OBhQB6XR1t7E6Mha+ABg0+njcY= x-ms-office365-filtering-correlation-id: ded488bc-a086-479f-ce1c-08d4b645cdab x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:YTXPR01MB0189; x-ms-traffictypediagnostic: YTXPR01MB0189: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849)(211171220733660); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123558100)(20161123564025)(20161123560025)(20161123555025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:YTXPR01MB0189; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:YTXPR01MB0189; x-forefront-prvs: 034215E98F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39410400002)(39850400002)(39840400002)(39450400003)(377454003)(24454002)(2906002)(3660700001)(6306002)(55016002)(105586002)(3280700002)(478600001)(2201001)(189998001)(53936002)(9686003)(229853002)(14454004)(33656002)(2950100002)(74482002)(966005)(2501003)(77096006)(6506006)(8676002)(6436002)(81166006)(102836003)(5660300001)(6246003)(38730400002)(53546009)(25786009)(305945005)(39060400002)(7696004)(2900100001)(8936002)(122556002)(74316002)(54356999)(76176999)(50986999)(86362001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0189; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2017 12:30:28.5201 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0189 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 12:30:31 -0000 I have committed r320070, which takes the definition out of param.h and sho= uld fix the build. I will ask on freebsd-current@ how best to fix this. Thanks for reporting it and sorry about the breakage, rick ________________________________________ From: Michal Meloun Sent: Sunday, June 18, 2017 3:16:07 AM To: Rick Macklem; src-committers@freebsd.org; svn-src-all@freebsd.org; svn-= src-head@freebsd.org Subject: Re: svn commit: r320062 - in head/sys: fs/nfs fs/nfsclient kern sy= s On 18.06.2017 0:24, Rick Macklem wrote: > Author: rmacklem > Date: Sat Jun 17 22:24:19 2017 > New Revision: 320062 > URL: https://svnweb.freebsd.org/changeset/base/320062 > > Log: > Make MAXBCACHEBUF a tunable called vfs.maxbcachebuf. > > By making MAXBCACHEBUF a tunable, it can be increased to allow for > larger read/write data sizes for the NFS client. > The tunable is limited to MAXPHYS, which is currently 128K. > Making MAXPHYS a tunable or increasing its value is being discussed, > since it would be nice to support a read/write data size of 1Mbyte > for the NFS client when mounting the AmazonEFS file service. > > Reviewed by: kib > MFC after: 2 weeks > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D10991 > > Modified: > head/sys/fs/nfs/nfs_commonkrpc.c > head/sys/fs/nfs/nfsport.h > head/sys/fs/nfsclient/nfs_clrpcops.c > head/sys/kern/vfs_bio.c > head/sys/sys/param.h > This one breaks armv6 kernel: cc -target armv6-gnueabihf-freebsd12.0 --sysroot=3D/usr2/Meloun/obj//arm.armv6/usr2/Meloun/git/tegra/tmp -B/usr2/Meloun/obj//arm.armv6/usr2/Meloun/git/tegra/tmp/usr/bin -c -x assembler-with-cpp -DLOCORE -O -pipe -g -nostdinc -I. -I/usr2/Meloun/git/tegra/sys -I/usr2/Meloun/git/tegra/sys/contrib/libfdt -I/usr2/Meloun/git/tegra/sys/gnu/dts/include -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -march=3Darmv7a -funwind-tables -MD -MF.depend.elf_note.o -MTelf_note.o -ffreestanding -fwrapv -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member -mfpu=3Dnone -std=3Diso9899:1999 -Werror /usr2/Meloun/git/tegra/sys/arm/arm/elf_note.S /usr2/Meloun/git/tegra/sys/sys/param.h:272:12: error: unexpected token in argument list extern int maxbcachebuf; ^ /usr2/Meloun/git/tegra/sys/arm/arm/elf_note.S:35:1: warning: DWARF2 only supports one section per compilation unit .pushsection .note.tag ; .balign 4 ; .long 2f - 1f ; .long 4f - 3f ; .long 1 ; 1: .asciz "FreeBSD" ; 2: .balign 4 ; 3: .long 1200033 ; 4: .balign 4 ; .popsection; ^ *** Error code 1 Michal > Modified: head/sys/fs/nfs/nfs_commonkrpc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/nfs/nfs_commonkrpc.c Sat Jun 17 20:33:11 2017 (r3= 20061) > +++ head/sys/fs/nfs/nfs_commonkrpc.c Sat Jun 17 22:24:19 2017 (r3= 20062) > @@ -161,7 +161,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockre= q > struct ucred *cred, NFSPROC_T *p, int callback_retry_mult) > { > int rcvreserve, sndreserve; > - int pktscale; > + int pktscale, pktscalesav; > struct sockaddr *saddr; > struct ucred *origcred; > CLIENT *client; > @@ -210,6 +210,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockre= q > pktscale =3D 2; > if (pktscale > 64) > pktscale =3D 64; > + pktscalesav =3D pktscale; > /* > * soreserve() can fail if sb_max is too small, so shrink pktscale > * and try again if there is an error. > @@ -228,8 +229,12 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockr= eq > goto out; > } > do { > - if (error !=3D 0 && pktscale > 2) > + if (error !=3D 0 && pktscale > 2) { > + if (nmp !=3D NULL && nrp->nr_sotype =3D=3D SOCK_STREAM && > + pktscale =3D=3D pktscalesav) > + printf("Consider increasing kern.ipc.maxsockbuf\n"); > pktscale--; > + } > if (nrp->nr_sotype =3D=3D SOCK_DGRAM) { > if (nmp !=3D NULL) { > sndreserve =3D (NFS_MAXDGRAMDATA + NFS_MAXPKTHDR) * > @@ -243,15 +248,19 @@ newnfs_connect(struct nfsmount *nmp, struct nfssock= req > if (nrp->nr_sotype !=3D SOCK_STREAM) > panic("nfscon sotype"); > if (nmp !=3D NULL) { > - sndreserve =3D (NFS_MAXBSIZE + NFS_MAXPKTHDR + > + sndreserve =3D (NFS_MAXBSIZE + NFS_MAXXDR + > sizeof (u_int32_t)) * pktscale; > - rcvreserve =3D (NFS_MAXBSIZE + NFS_MAXPKTHDR + > + rcvreserve =3D (NFS_MAXBSIZE + NFS_MAXXDR + > sizeof (u_int32_t)) * pktscale; > } else { > sndreserve =3D rcvreserve =3D 1024 * pktscale; > } > } > error =3D soreserve(so, sndreserve, rcvreserve); > + if (error !=3D 0 && nmp !=3D NULL && nrp->nr_sotype =3D=3D SOCK= _STREAM && > + pktscale <=3D 2) > + printf("Must increase kern.ipc.maxsockbuf or reduce" > + " rsize, wsize\n"); > } while (error !=3D 0 && pktscale > 2); > soclose(so); > if (error) { > > Modified: head/sys/fs/nfs/nfsport.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/nfs/nfsport.h Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/fs/nfs/nfsport.h Sat Jun 17 22:24:19 2017 (r320062) > @@ -1016,7 +1016,7 @@ struct nfsreq { > }; > > #ifndef NFS_MAXBSIZE > -#define NFS_MAXBSIZE MAXBCACHEBUF > +#define NFS_MAXBSIZE (maxbcachebuf) > #endif > > /* > > Modified: head/sys/fs/nfsclient/nfs_clrpcops.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 17 20:33:11 2017 = (r320061) > +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 17 22:24:19 2017 = (r320062) > @@ -4625,7 +4625,7 @@ nfsrpc_createsession(struct nfsmount *nmp, struct n= fsc > struct nfssockreq *nrp, uint32_t sequenceid, int mds, struct ucred *= cred, > NFSPROC_T *p) > { > - uint32_t crflags, *tl; > + uint32_t crflags, maxval, *tl; > struct nfsrv_descript nfsd; > struct nfsrv_descript *nd =3D &nfsd; > int error, irdcnt; > @@ -4643,8 +4643,8 @@ nfsrpc_createsession(struct nfsmount *nmp, struct n= fsc > /* Fill in fore channel attributes. */ > NFSM_BUILD(tl, uint32_t *, 7 * NFSX_UNSIGNED); > *tl++ =3D 0; /* Header pad size */ > - *tl++ =3D txdr_unsigned(100000); /* Max request size */ > - *tl++ =3D txdr_unsigned(100000); /* Max response size */ > + *tl++ =3D txdr_unsigned(nmp->nm_wsize + NFS_MAXXDR);/* Max request = size */ > + *tl++ =3D txdr_unsigned(nmp->nm_rsize + NFS_MAXXDR);/* Max reply si= ze */ > *tl++ =3D txdr_unsigned(4096); /* Max response size cach= ed */ > *tl++ =3D txdr_unsigned(20); /* Max operations */ > *tl++ =3D txdr_unsigned(64); /* Max slots */ > @@ -4691,7 +4691,26 @@ nfsrpc_createsession(struct nfsmount *nmp, struct = nfsc > > /* Get the fore channel slot count. */ > NFSM_DISSECT(tl, uint32_t *, 7 * NFSX_UNSIGNED); > - tl +=3D 3; /* Skip the other counts. */ > + tl++; /* Skip the header pad size. */ > + > + /* Make sure nm_wsize is small enough. */ > + maxval =3D fxdr_unsigned(uint32_t, *tl++); > + while (maxval < nmp->nm_wsize + NFS_MAXXDR) { > + if (nmp->nm_wsize > 8096) > + nmp->nm_wsize /=3D 2; > + else > + break; > + } > + > + /* Make sure nm_rsize is small enough. */ > + maxval =3D fxdr_unsigned(uint32_t, *tl++); > + while (maxval < nmp->nm_rsize + NFS_MAXXDR) { > + if (nmp->nm_rsize > 8096) > + nmp->nm_rsize /=3D 2; > + else > + break; > + } > + > sep->nfsess_maxcache =3D fxdr_unsigned(int, *tl++); > tl++; > sep->nfsess_foreslots =3D fxdr_unsigned(uint16_t, *tl++); > > Modified: head/sys/kern/vfs_bio.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/vfs_bio.c Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/kern/vfs_bio.c Sat Jun 17 22:24:19 2017 (r320062) > @@ -131,6 +131,7 @@ static void bufkva_reclaim(vmem_t *, int); > static void bufkva_free(struct buf *); > static int buf_import(void *, void **, int, int); > static void buf_release(void *, void **, int); > +static void maxbcachebuf_adjust(void); > > #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ > defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) > @@ -245,6 +246,9 @@ SYSCTL_LONG(_vfs, OID_AUTO, barrierwrites, CTLFLAG_RW= , > SYSCTL_INT(_vfs, OID_AUTO, unmapped_buf_allowed, CTLFLAG_RD, > &unmapped_buf_allowed, 0, > "Permit the use of the unmapped i/o"); > +int maxbcachebuf =3D MAXBCACHEBUF; > +SYSCTL_INT(_vfs, OID_AUTO, maxbcachebuf, CTLFLAG_RDTUN, &maxbcachebuf, 0= , > + "Maximum size of a buffer cache block"); > > /* > * This lock synchronizes access to bd_request. > @@ -847,6 +851,29 @@ bd_wakeup(void) > } > > /* > + * Adjust the maxbcachbuf tunable. > + */ > +static void > +maxbcachebuf_adjust(void) > +{ > + int i; > + > + /* > + * maxbcachebuf must be a power of 2 >=3D MAXBSIZE. > + */ > + i =3D 2; > + while (i * 2 <=3D maxbcachebuf) > + i *=3D 2; > + maxbcachebuf =3D i; > + if (maxbcachebuf < MAXBSIZE) > + maxbcachebuf =3D MAXBSIZE; > + if (maxbcachebuf > MAXPHYS) > + maxbcachebuf =3D MAXPHYS; > + if (bootverbose !=3D 0 && maxbcachebuf !=3D MAXBCACHEBUF) > + printf("maxbcachebuf=3D%d\n", maxbcachebuf); > +} > + > +/* > * bd_speedup - speedup the buffer cache flushing code > */ > void > @@ -893,6 +920,7 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est= ) > */ > physmem_est =3D physmem_est * (PAGE_SIZE / 1024); > > + maxbcachebuf_adjust(); > /* > * The nominal buffer size (and minimum KVA allocation) is BKVASIZE= . > * For the first 64MB of ram nominally allocate sufficient buffers = to > @@ -1003,7 +1031,9 @@ bufinit(void) > struct buf *bp; > int i; > > - CTASSERT(MAXBCACHEBUF >=3D MAXBSIZE); > + KASSERT(maxbcachebuf >=3D MAXBSIZE, > + ("maxbcachebuf (%d) must be >=3D MAXBSIZE (%d)\n", maxbcachebuf= , > + MAXBSIZE)); > mtx_init(&bqlocks[QUEUE_DIRTY], "bufq dirty lock", NULL, MTX_DEF); > mtx_init(&bqlocks[QUEUE_EMPTY], "bufq empty lock", NULL, MTX_DEF); > for (i =3D QUEUE_CLEAN; i < QUEUE_CLEAN + CLEAN_QUEUES; i++) > @@ -1050,7 +1080,7 @@ bufinit(void) > * PAGE_SIZE. > */ > maxbufspace =3D (long)nbuf * BKVASIZE; > - hibufspace =3D lmax(3 * maxbufspace / 4, maxbufspace - MAXBCACHEBUF= * 10); > + hibufspace =3D lmax(3 * maxbufspace / 4, maxbufspace - maxbcachebuf= * 10); > lobufspace =3D (hibufspace / 20) * 19; /* 95% */ > bufspacethresh =3D lobufspace + (hibufspace - lobufspace) / 2; > > @@ -1062,9 +1092,9 @@ bufinit(void) > * The lower 1 MiB limit is the historical upper limit for > * hirunningspace. > */ > - hirunningspace =3D lmax(lmin(roundup(hibufspace / 64, MAXBCACHEBUF)= , > + hirunningspace =3D lmax(lmin(roundup(hibufspace / 64, maxbcachebuf)= , > 16 * 1024 * 1024), 1024 * 1024); > - lorunningspace =3D roundup((hirunningspace * 2) / 3, MAXBCACHEBUF); > + lorunningspace =3D roundup((hirunningspace * 2) / 3, maxbcachebuf); > > /* > * Limit the amount of malloc memory since it is wired permanently = into > @@ -3484,9 +3514,9 @@ getblk(struct vnode *vp, daddr_t blkno, int size, i= nt > KASSERT((flags & (GB_UNMAPPED | GB_KVAALLOC)) !=3D GB_KVAALLOC, > ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); > ASSERT_VOP_LOCKED(vp, "getblk"); > - if (size > MAXBCACHEBUF) > - panic("getblk: size(%d) > MAXBCACHEBUF(%d)\n", size, > - MAXBCACHEBUF); > + if (size > maxbcachebuf) > + panic("getblk: size(%d) > maxbcachebuf(%d)\n", size, > + maxbcachebuf); > if (!unmapped_buf_allowed) > flags &=3D ~(GB_UNMAPPED | GB_KVAALLOC); > > > Modified: head/sys/sys/param.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/param.h Sat Jun 17 20:33:11 2017 (r320061) > +++ head/sys/sys/param.h Sat Jun 17 22:24:19 2017 (r320062) > @@ -244,9 +244,7 @@ > * Filesystems can of course request smaller chunks. Actual > * backing memory uses a chunk size of a page (PAGE_SIZE). > * The default value here can be overridden on a per-architect= ure > - * basis by defining it in . This should > - * probably be done to increase its value, when MAXBCACHEBUF i= s > - * defined as a larger value in . > + * basis by defining it in . > * > * If you make BKVASIZE too small you risk seriously fragmenti= ng > * the buffer KVM map which may slow things down a bit. If yo= u > @@ -265,6 +263,14 @@ > #define BKVASIZE 16384 /* must be power of 2 */ > #endif > #define BKVAMASK (BKVASIZE-1) > + > +/* > + * This variable is tuned via vfs.maxbcachebuf and is set to the value o= f > + * MAXBCACHEBUF by default. > + */ > +#ifdef _KERNEL > +extern int maxbcachebuf; > +#endif > > /* > * MAXPATHLEN defines the longest permissible path length after expandin= g >