From owner-freebsd-arch@FreeBSD.ORG Mon Oct 19 11:06:49 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F81E106568B for ; Mon, 19 Oct 2009 11:06:49 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D8E5F8FC1C for ; Mon, 19 Oct 2009 11:06:48 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n9JB6muh063374 for ; Mon, 19 Oct 2009 11:06:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n9JB6mir063372 for freebsd-arch@FreeBSD.org; Mon, 19 Oct 2009 11:06:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 19 Oct 2009 11:06:48 GMT Message-Id: <200910191106.n9JB6mir063372@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arch@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2009 11:06:49 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/120749 arch [request] Suggest upping the default kern.ps_arg_cache 1 problem total. From owner-freebsd-arch@FreeBSD.ORG Mon Oct 19 20:34:39 2009 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25AE1106566C for ; Mon, 19 Oct 2009 20:34:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id EE2048FC19 for ; Mon, 19 Oct 2009 20:34:38 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A12AE46B2C for ; Mon, 19 Oct 2009 16:34:38 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id A39CB8A020 for ; Mon, 19 Oct 2009 16:34:37 -0400 (EDT) From: John Baldwin To: arch@FreeBSD.org Date: Mon, 19 Oct 2009 16:34:29 -0400 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910191634.30040.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 19 Oct 2009 16:34:37 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: Put a timeout on -ve name cache entries in NFS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2009 20:34:39 -0000 This patch allows one to put an upper time limit on how long the NFS client should keep negative cache entries around for a given directory. This is basically a safety belt as there are certain races with -ve entries that are not easily fixed (e.g. dealing with the low resolution of the directory modification timestamps). However, timing out the entries would put a limit on how stale the client's cache entries could be. My main question is do folks think this value should be tunable as a global sysctl or a per-mount option. A sysctl is far easier to implement (and the acccess cache timeout is a sysctl). However, the other namecache-related settings are all mount options, so a mount option might be more consistent. Current rough patch is below: --- //depot/projects/smpng/sys/nfsclient/nfs_vnops.c 2009/10/19 14:27:26 +++ //depot/user/jhb/lock/nfsclient/nfs_vnops.c 2009/10/19 19:53:51 @@ -981,9 +981,11 @@ * We only accept a negative hit in the cache if the * modification time of the parent directory matches * our cached copy. Otherwise, we discard all of the - * negative cache entries for this directory. + * negative cache entries for this directory. We also + * only trust -ve cache entries for up to 5 seconds. */ - if (VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && + if ((u_int)(ticks - np->n_dmtime_ticks) <= 5 && + VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && vattr.va_mtime.tv_sec == np->n_dmtime) { nfsstats.lookupcache_hits++; return (ENOENT); @@ -1157,8 +1159,10 @@ */ mtx_lock(&np->n_mtx); if (np->n_dmtime <= dmtime) { - if (np->n_dmtime == 0) + if (np->n_dmtime == 0) { np->n_dmtime = dmtime; + np->n_dmtime_ticks = ticks; + } mtx_unlock(&np->n_mtx); cache_enter(dvp, NULL, cnp); } else --- //depot/projects/smpng/sys/nfsclient/nfsnode.h 2009/05/29 14:35:29 +++ //depot/user/jhb/lock/nfsclient/nfsnode.h 2009/10/19 19:53:51 @@ -119,6 +119,7 @@ struct vnode *n_vnode; /* associated vnode */ struct vnode *n_dvp; /* parent vnode */ int n_error; /* Save write error value */ + int n_dmtime_ticks; /* When n_dmtime was last set */ union { struct timespec nf_atim; /* Special file times */ nfsuint64 nd_cookieverf; /* Cookie verifier (dir only) */ -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Tue Oct 20 07:35:21 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43C4B1065694 for ; Tue, 20 Oct 2009 07:35:21 +0000 (UTC) (envelope-from Alexei.Volkov@softlynx.ru) Received: from softlynx.ru (softlynx.ru [95.66.187.155]) by mx1.freebsd.org (Postfix) with ESMTP id F37FA8FC13 for ; Tue, 20 Oct 2009 07:35:20 +0000 (UTC) Received: from [127.0.0.1] (gw.vladimir.psbank.ru [95.66.157.3]) by softlynx.ru (Postfix) with ESMTPSA id 60C1096100 for ; Tue, 20 Oct 2009 11:26:38 +0400 (MSD) Message-ID: <4ADD662E.9020003@softlynx.ru> Date: Tue, 20 Oct 2009 11:26:38 +0400 From: Alexei Volkov User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Automatic dual kernel cd boot amd64/i386 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2009 07:35:21 -0000 Hello. Is it possible to get bootable cd with auto selectable amd64/i386 boot? For instance , i have a bootable cd with two kernels: * first is located in /boot/kernel.amd64 * second in /boot/kernel.i386 loader.conf has line /kernel=kernel.amd64/ When it boots on amd64 incompatible hardware it start loading the kernel and returns to the loader prompt showing error "Long mode not supported" or something like that. Is it possible to configure loader.conf or any other place to get automatically started with second kernel.i386 from that point instead of waiting for user interaction? WBR, Alexei Volkov. From owner-freebsd-arch@FreeBSD.ORG Tue Oct 20 07:40:21 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F26E8106566B for ; Tue, 20 Oct 2009 07:40:21 +0000 (UTC) (envelope-from Alexei.Volkov@softlynx.ru) Received: from softlynx.ru (softlynx.ru [95.66.187.155]) by mx1.freebsd.org (Postfix) with ESMTP id B0DEF8FC19 for ; Tue, 20 Oct 2009 07:40:21 +0000 (UTC) Received: from [127.0.0.1] (gw.vladimir.psbank.ru [95.66.157.3]) by softlynx.ru (Postfix) with ESMTPSA id 3E3C7960CB for ; Tue, 20 Oct 2009 11:22:31 +0400 (MSD) Message-ID: <4ADD6536.6000902@softlynx.ru> Date: Tue, 20 Oct 2009 11:22:30 +0400 From: Alexei Volkov User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Automatic dual kernel cd boot amd64/i386 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2009 07:40:22 -0000 Hello. Is it possible to get bootable cd with auto selectable amd64/i386 boot? For instance , i have a bootable cd with two kernels: * first is located in /boot/kernel.amd64 * second in /boot/kernel.i386 loader.conf has line /kernel=kernel.amd64/ When it boots on amd64 incompatible hardware it start loading the kernel and returns to the loader prompt showing error "Long mode not supported" or something like that. Is it possible to configure loader.conf or any other place to get automatically started with second kernel.i386 from that point instead of waiting for user interaction? WBR, Alexei Volkov. From owner-freebsd-arch@FreeBSD.ORG Wed Oct 21 22:20:45 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD3F1106566B for ; Wed, 21 Oct 2009 22:20:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 556818FC18 for ; Wed, 21 Oct 2009 22:20:45 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 93C981CC4F; Thu, 22 Oct 2009 00:20:54 +0200 (CEST) Date: Thu, 22 Oct 2009 00:20:54 +0200 From: Ed Schouten To: FreeBSD Arch Message-ID: <20091021222054.GJ1293@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GmiNL4+5WUWrod5m" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Setting the jail identifier from /etc/rc.conf X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2009 22:20:45 -0000 --GmiNL4+5WUWrod5m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I haven't played with Jails for a long time, but I wanted to figure out how hard it is to make init spawn getties for certain jails. It shouldn't be too hard (jexec foo /usr/libexec/getty), but I can't seem to find a way to set the jid to a certain value from within rc.conf. It also seems jids cannot contain dots, which means I cannot set the jid equal to the hostname of the jail. Maybe a Jail hacker can give me some advice here? Wouldn't it be more sane if the kernel just used the hostname as an identifier if there is no jail with the same hostname yet? Or maybe we should at least provide a config tunable for this? --=20 Ed Schouten WWW: http://80386.nl/ --GmiNL4+5WUWrod5m Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrfiUYACgkQ52SDGA2eCwXZkACeLifdSinZSzo2uY/qWN7YHxjw 6yUAn2W6QWZrCqa/8YXNcehNIAr+w4uD =NUt8 -----END PGP SIGNATURE----- --GmiNL4+5WUWrod5m-- From owner-freebsd-arch@FreeBSD.ORG Wed Oct 21 22:54:31 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 983131065672 for ; Wed, 21 Oct 2009 22:54:31 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 531D48FC31 for ; Wed, 21 Oct 2009 22:54:31 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id B5AB841C713; Thu, 22 Oct 2009 00:35:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id IWLFJsWBtkMc; Thu, 22 Oct 2009 00:35:06 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 6C0D241C72C; Thu, 22 Oct 2009 00:35:06 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 338A94448E6; Wed, 21 Oct 2009 22:30:17 +0000 (UTC) Date: Wed, 21 Oct 2009 22:30:17 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Ed Schouten In-Reply-To: <20091021222054.GJ1293@hoeg.nl> Message-ID: <20091021222851.O91695@maildrop.int.zabbadoz.net> References: <20091021222054.GJ1293@hoeg.nl> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Arch , freebsd-jail@freebsd.org Subject: Re: Setting the jail identifier from /etc/rc.conf X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-jail@freebsd.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2009 22:54:31 -0000 On Thu, 22 Oct 2009, Ed Schouten wrote: > Hi, > > I haven't played with Jails for a long time, but I wanted to figure out > how hard it is to make init spawn getties for certain jails. It > shouldn't be too hard (jexec foo /usr/libexec/getty), but I can't seem > to find a way to set the jid to a certain value from within rc.conf. > > It also seems jids cannot contain dots, which means I cannot set the jid > equal to the hostname of the jail. > > Maybe a Jail hacker can give me some advice here? Wouldn't it be more > sane if the kernel just used the hostname as an identifier if there is > no jail with the same hostname yet? Or maybe we should at least provide > a config tunable for this? Redirect to freebsd-jail@ ; you may even find the answers to those int he mail archive (unless those had been private threads I was on Cc: on;-) -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-freebsd-arch@FreeBSD.ORG Wed Oct 21 22:54:34 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AE98106566C for ; Wed, 21 Oct 2009 22:54:34 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 0E8538FC12 for ; Wed, 21 Oct 2009 22:54:33 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 076006D41C; Wed, 21 Oct 2009 22:54:33 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id C1CA2844E9; Thu, 22 Oct 2009 00:54:32 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <20091021222054.GJ1293@hoeg.nl> Date: Thu, 22 Oct 2009 00:54:32 +0200 In-Reply-To: <20091021222054.GJ1293@hoeg.nl> (Ed Schouten's message of "Thu, 22 Oct 2009 00:20:54 +0200") Message-ID: <86ljj4s6hj.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Arch Subject: Re: Setting the jail identifier from /etc/rc.conf X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2009 22:54:34 -0000 Ed Schouten writes: > I haven't played with Jails for a long time, but I wanted to figure out > how hard it is to make init spawn getties for certain jails. It > shouldn't be too hard (jexec foo /usr/libexec/getty), but I can't seem > to find a way to set the jid to a certain value from within rc.conf. The jid is a number assigned by the kernel which increases monotonically for every jail created. If you stop and restart a jail, it will get a new jid. If you're thinking of the jail name as specified in rc.conf, that's internal to the rc script - it is not passed to the kernel. The kernel's idea of the jail name defaults to the string representation of the jid (i.e. a jail with jid 4 is named "4" unless otherwise specified on the command line). There is no rc.conf variable for it, but you can add "-n foo" to jail_foo_flags. (it seems /etc/rc.d/jail hasn't quite caught up with the new jail(8) command line syntax) Currently, your best bet is probably to read the jid from /var/run/jail_${foo}.id, which is created by the rc script when it starts the jail. > It also seems jids cannot contain dots, which means I cannot set the jid > equal to the hostname of the jail. The jail name can not contain dots because jails can nest, and dots are used to separate components in the fully qualified name of a jail. If you start a jail named "foo", and within "foo" start a jail named "bar", then the fully qualified name of the inner jail is "foo.bar". DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Thu Oct 22 07:33:55 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D39791065672; Thu, 22 Oct 2009 07:33:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 582FA8FC19; Thu, 22 Oct 2009 07:33:54 +0000 (UTC) Received: from c122-106-156-249.carlnfd1.nsw.optusnet.com.au (c122-106-156-249.carlnfd1.nsw.optusnet.com.au [122.106.156.249]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n9M7Xqt9014634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Oct 2009 18:33:52 +1100 Date: Thu, 22 Oct 2009 18:33:52 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200910191634.30040.jhb@freebsd.org> Message-ID: <20091022182943.P13634@delplex.bde.org> References: <200910191634.30040.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org Subject: Re: Put a timeout on -ve name cache entries in NFS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2009 07:33:55 -0000 On Mon, 19 Oct 2009, John Baldwin wrote: > This patch allows one to put an upper time limit on how long the NFS client > should keep negative cache entries around for a given directory. This is > basically a safety belt as there are certain races with -ve entries that are > not easily fixed (e.g. dealing with the low resolution of the directory > modification timestamps). However, timing out the entries would put a limit > on how stale the client's cache entries could be. My main question is do > folks think this value should be tunable as a global sysctl or a per-mount > option. A sysctl is far easier to implement (and the acccess cache timeout > is a sysctl). However, the other namecache-related settings are all mount > options, so a mount option might be more consistent. Current rough patch is > below: One reason that I never committed my port of NetBSD's implementation of negative cache entries for nfs is that I thought the timeout should be a mount option but I didn't want to deal with the portability problems from that. Bruce From owner-freebsd-arch@FreeBSD.ORG Thu Oct 22 12:08:18 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23A04106566B; Thu, 22 Oct 2009 12:08:18 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id BC2E78FC17; Thu, 22 Oct 2009 12:08:17 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 53D991CC4D; Thu, 22 Oct 2009 14:08:16 +0200 (CEST) Date: Thu, 22 Oct 2009 14:08:16 +0200 From: Ed Schouten To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20091022120816.GK1293@hoeg.nl> References: <20091021222054.GJ1293@hoeg.nl> <86ljj4s6hj.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zH41lVBEV8cLJnCl" Content-Disposition: inline In-Reply-To: <86ljj4s6hj.fsf@ds4.des.no> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Arch , FreeBSD Jail Subject: Re: Setting the jail identifier from /etc/rc.conf X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2009 12:08:18 -0000 --zH41lVBEV8cLJnCl Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Dag-Erling, * Dag-Erling Sm=F8rgrav wrote: > on the command line). There is no rc.conf variable for it, but you can > add "-n foo" to jail_foo_flags. Well, good enough I guess. I solved the entire getty thing by doing the following. I'm running a jail called small.80386.nl, which is a temporary install I had, to see what happens if you enable a lot of WITHOUT_* flags. /etc/devfs.rules: | [small_80386_nl=3D5] | add include $devfsrules_hide_all | add include $devfsrules_unhide_basic | add include $devfsrules_unhide_login | add path ttyv8 unhide /etc/rc.conf: | jail_small_flags=3D"-l -U root -n small_80386_nl" | jail_small_devfs_ruleset=3D"small_80386_nl" /etc/ttys: | ttyv8 "/usr/sbin/jexec small_80386_nl /usr/libexec/getty Pc" cons25 on se= cure --=20 Ed Schouten WWW: http://80386.nl/ --zH41lVBEV8cLJnCl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrgSzAACgkQ52SDGA2eCwVjigCffgZ/9igGufiv9bxmc2QnCMAO PXYAn0ZF4o7g40qHvkiY6eAwjUtWhZic =uO5V -----END PGP SIGNATURE----- --zH41lVBEV8cLJnCl-- From owner-freebsd-arch@FreeBSD.ORG Thu Oct 22 15:02:21 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26C27106566B for ; Thu, 22 Oct 2009 15:02:21 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id CBE8D8FC0C for ; Thu, 22 Oct 2009 15:02:20 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEADcK4EqDaFvK/2dsb2JhbADbaYQ/BA X-IronPort-AV: E=Sophos;i="4.44,605,1249272000"; d="scan'208";a="50842696" Received: from fraser.cs.uoguelph.ca ([131.104.91.202]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 22 Oct 2009 10:33:05 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by fraser.cs.uoguelph.ca (Postfix) with ESMTP id AD3DA109C2FE; Thu, 22 Oct 2009 10:33:05 -0400 (EDT) X-Virus-Scanned: amavisd-new at fraser.cs.uoguelph.ca Received: from fraser.cs.uoguelph.ca ([127.0.0.1]) by localhost (fraser.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QrJ7Tzq0mbET; Thu, 22 Oct 2009 10:33:05 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by fraser.cs.uoguelph.ca (Postfix) with ESMTP id 159CA109C271; Thu, 22 Oct 2009 10:33:05 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n9MEdwY02479; Thu, 22 Oct 2009 10:39:58 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Thu, 22 Oct 2009 10:39:58 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Bruce Evans In-Reply-To: <20091022182943.P13634@delplex.bde.org> Message-ID: References: <200910191634.30040.jhb@freebsd.org> <20091022182943.P13634@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org Subject: Re: Put a timeout on -ve name cache entries in NFS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2009 15:02:21 -0000 On Thu, 22 Oct 2009, Bruce Evans wrote: > > One reason that I never committed my port of NetBSD's implementation of > negative cache entries for nfs is that I thought the timeout should be > a mount option but I didn't want to deal with the portability problems > from that. > Just to clarify. Are you saying that, given no other system has such a mount option, you think the sysctl variable is an ok solution or that you think it should be a mount option and not a sysctl variable? I'll admit that I'm biased because the sysctl variable is easier to do (and I don't think many people will need to twiddle it). I suggested it to John, mostly so that there was a way of disabling the -ve name caching, for the rare case where it might be causing someone grief. (That's what I think he meant by "safety belt".) rick From owner-freebsd-arch@FreeBSD.ORG Fri Oct 23 14:29:29 2009 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82B8B1065694; Fri, 23 Oct 2009 14:29:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id ED5A18FC20; Fri, 23 Oct 2009 14:29:28 +0000 (UTC) Received: from c122-106-159-135.carlnfd1.nsw.optusnet.com.au (c122-106-159-135.carlnfd1.nsw.optusnet.com.au [122.106.159.135]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n9NETOGc003170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 24 Oct 2009 01:29:26 +1100 Date: Sat, 24 Oct 2009 01:29:24 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Rick Macklem In-Reply-To: Message-ID: <20091024010347.D14674@delplex.bde.org> References: <200910191634.30040.jhb@freebsd.org> <20091022182943.P13634@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@FreeBSD.org, John Baldwin Subject: Re: Put a timeout on -ve name cache entries in NFS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2009 14:29:29 -0000 On Thu, 22 Oct 2009, Rick Macklem wrote: > On Thu, 22 Oct 2009, Bruce Evans wrote: >> One reason that I never committed my port of NetBSD's implementation of >> negative cache entries for nfs is that I thought the timeout should be >> a mount option but I didn't want to deal with the portability problems >> from that. >> > Just to clarify. Are you saying that, given no other system has such > a mount option, you think the sysctl variable is an ok solution or > that you think it should be a mount option and not a sysctl variable? No; I think it should be a mount option. > I'll admit that I'm biased because the sysctl variable is easier to > do (and I don't think many people will need to twiddle it). I suggested > it to John, mostly so that there was a way of disabling the -ve name > caching, for the rare case where it might be causing someone grief. > (That's what I think he meant by "safety belt".) Mount options are harder to add (especially using nmount) but that is not intrinsic (in 4.4BSD, sysctls were harder to add, but now they have more infrastructure so they are easier to add). It would almost be easier to abuse sysctls for mount options (they would have to select the mount instance). My version actually just uses a hackish sysctl vfs.nfs.negcache (default: enabled) to enable the negative name cache. I don't have any timeout control for it. Bruce From owner-freebsd-arch@FreeBSD.ORG Fri Oct 23 14:43:33 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09FB0106568B; Fri, 23 Oct 2009 14:43:33 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 999358FC22; Fri, 23 Oct 2009 14:43:32 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAA9e4UqDaFvJ/2dsb2JhbADZT4Q/BA X-IronPort-AV: E=Sophos;i="4.44,612,1249272000"; d="scan'208";a="52614119" Received: from ganges.cs.uoguelph.ca ([131.104.91.201]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 23 Oct 2009 10:43:30 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ganges.cs.uoguelph.ca (Postfix) with ESMTP id 98AC7FB80E6; Fri, 23 Oct 2009 10:43:31 -0400 (EDT) X-Virus-Scanned: amavisd-new at ganges.cs.uoguelph.ca Received: from ganges.cs.uoguelph.ca ([127.0.0.1]) by localhost (ganges.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f8bryNq6sAb4; Fri, 23 Oct 2009 10:43:30 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by ganges.cs.uoguelph.ca (Postfix) with ESMTP id 8FFABFB8012; Fri, 23 Oct 2009 10:43:30 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n9NEoPN17740; Fri, 23 Oct 2009 10:50:25 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Fri, 23 Oct 2009 10:50:25 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Bruce Evans In-Reply-To: <20091024010347.D14674@delplex.bde.org> Message-ID: References: <200910191634.30040.jhb@freebsd.org> <20091022182943.P13634@delplex.bde.org> <20091024010347.D14674@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@FreeBSD.org, John Baldwin Subject: Re: Put a timeout on -ve name cache entries in NFS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2009 14:43:33 -0000 On Sat, 24 Oct 2009, Bruce Evans wrote: > On Thu, 22 Oct 2009, Rick Macklem wrote: > >> On Thu, 22 Oct 2009, Bruce Evans wrote: >>> One reason that I never committed my port of NetBSD's implementation of >>> negative cache entries for nfs is that I thought the timeout should be >>> a mount option but I didn't want to deal with the portability problems >>> from that. >>> >> Just to clarify. Are you saying that, given no other system has such >> a mount option, you think the sysctl variable is an ok solution or >> that you think it should be a mount option and not a sysctl variable? > > No; I think it should be a mount option. > Ok, so then what were your concerns w.r.t "portability problems"? (It's not that much work to make it a mount option and since it looks like the patch will be delayed until after 8.0 releases, I/or John can make it a mount option but I didn't understand what you meant by "portability options".) [good stuff w.r.t. which is harder, deleted for brevity] > > My version actually just uses a hackish sysctl vfs.nfs.negcache (default: > enabled) to enable the negative name cache. I don't have any timeout > control for it. > Yea, I saw it mainly as a way to disable -ve caching too. It just happened that the sysctl variable could specify the timeout as well as disable it (if set == 0). When it comes to a mount option, an enable/disable flag is probably easier, but then there might be a debate along the lines of "An option shouldn't be enabled by default...", so I'm temped to stick with a setable timeout. Basically the current code has an "infinite" timeout and no way of disabling it, so it seemed to me that some sort of optional timeout/disable would be useful, so I suggested that to John. If no-one else weighs in on the other side, I head in the "mount option" direction, rick