Date: Wed, 19 Nov 2014 14:08:20 -0500 From: John Baldwin <jhb@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: Konstantin Belousov <kostikbel@gmail.com>, Andriy Gapon <avg@freebsd.org>, Jung-uk Kim <jkim@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: suspending threads before devices Message-ID: <1580793.3ynJAbfVom@ralph.baldwin.cx> In-Reply-To: <87FFDA99-ADDC-4F56-A3E8-56CCAA544542@bsdimp.com> References: <201203202037.q2KKbNfK037014@svn.freebsd.org> <201411181721.56505.jhb@freebsd.org> <87FFDA99-ADDC-4F56-A3E8-56CCAA544542@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, November 18, 2014 08:43:09 PM Warner Losh wrote: > On Nov 18, 2014, at 3:21 PM, John Baldwin <jhb@FreeBSD.org> wrote: > > I would certainly like a way to quiesce threads before entering the= real > > suspend path. I would also like to cleanly unmount filesystems dur= ing > > suspend as well and the thread issue is a prerequisite for that.=20= > > However, reusing "stop at boundary" may not be quite correct becaus= e you > > probably don't want to block suspend because you have an NFS reques= t that > > is retrying due to a down NFS server. For NFS I think you want any= > > threads asleep to just not get a chance to run again until after re= sume > > completes. >=20 > I=E2=80=99m almost certain you don=E2=80=99t want to =E2=80=9Cunmount= =E2=80=9D the filesystems. This would > invalidate all open file handles and would be mondo-bado, and would o= nly > succeed if you forced this issue due to all the open references. Perh= aps > you=E2=80=99re being imprecise. Yes, there should have been quotes around unmount. I want a=20 VFS_SUSPEND/VFS_RESUME that for local filesystems (e.g. UFS) does the o= n-disk=20 equivalent of unmount. (Flush dirty buffers and mark filesystem as cle= an.) =20 You really want this for S4 and even for S3 so you don't have to fsck i= f=20 resume fails. BTW, I think for network or userland filesystems you jus= t punt=20 on this (i.e. VFS_SUSPEND is a no-op or best-effort at most) --=20 John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1580793.3ynJAbfVom>