From owner-freebsd-fs@FreeBSD.ORG Tue Nov 23 02:01:06 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A945D106566B; Tue, 23 Nov 2010 02:01:06 +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 358B38FC0C; Tue, 23 Nov 2010 02:01:05 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAL+u6kyDaFvO/2dsb2JhbACDSqARrCuRLIEigzZzBIRahgQ X-IronPort-AV: E=Sophos;i="4.59,239,1288584000"; d="scan'208";a="101652436" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 22 Nov 2010 21:01:05 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 62792B3F4B; Mon, 22 Nov 2010 21:01:05 -0500 (EST) Date: Mon, 22 Nov 2010 21:01:05 -0500 (EST) From: Rick Macklem To: John Baldwin Message-ID: <1793929802.495869.1290477665351.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <201011221629.27166.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [12.16.49.138] X-Mailer: Zimbra 6.0.7_GA_2476.RHEL4 (ZimbraWebClient - IE8 (Win)/6.0.7_GA_2473.RHEL4_64) Cc: freebsd-fs@freebsd.org, Ivan Voras Subject: Re: preferred kernel upcall method to master nfsd X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2010 02:01:06 -0000 > > nfsd is a user process. I suspect that when it receives a signal it > falls out of > nfssvc() with EINTR and handles saving the restart file in userland. > Is that close > to the process Rick or does you need to send a signal between threads > that are > exclusively within the kernel? > Yep, the kernel nfsd thread needs to tell the userland master nfsd to make a backup copy of the stable restart file now. Doing it with signals, the kernel code would post a signal (SIGUSR2 ?) to the master nfsd (which is normally in userland). The master nfsd would simply have a signal handler for SIGUSR2 that would copy the file (it's pretty small) to a backup copy. At least that's how I would think I could code it. I haven't actually tried it? My question was mostly if there was a preferred/better way for the kernel code to tell the userland master nfsd to copy the file? rick