Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2010 21:13:44 -0800
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        freebsd-fs@freebsd.org, Ivan Voras <ivoras@freebsd.org>
Subject:   Re: preferred kernel upcall method to master nfsd
Message-ID:  <20101123051344.GA67909@icarus.home.lan>
In-Reply-To: <1793929802.495869.1290477665351.JavaMail.root@erie.cs.uoguelph.ca>
References:  <201011221629.27166.jhb@freebsd.org> <1793929802.495869.1290477665351.JavaMail.root@erie.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 22, 2010 at 09:01:05PM -0500, Rick Macklem wrote:
> > 
> > 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?

Could kqueue(2) be used for this?

-- 
| Jeremy Chadwick                                   jdc@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




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