Date: Tue, 25 Nov 2014 12:27:54 +0000 From: Ruslan Bukin <br@freebsd.org> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: Konstantin Belousov <kostikbel@gmail.com>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm Message-ID: <20141125122754.GA57252@bsdpad.com> In-Reply-To: <20141125073145.GT47144@FreeBSD.org> References: <201411231201.sANC1rW1025589@svn.freebsd.org> <20141124110537.GA41282@bsdpad.com> <20141124173733.GI17068@kib.kiev.ua> <20141124180356.GA47782@bsdpad.com> <20141124192902.GQ47144@FreeBSD.org> <20141124211620.GA49975@bsdpad.com> <20141125073145.GT47144@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--uAKRQypu60I7Lcqm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Tue, Nov 25, 2014 at 10:31:45AM +0300, Gleb Smirnoff wrote: > On Mon, Nov 24, 2014 at 09:16:20PM +0000, Ruslan Bukin wrote: > R> On Mon, Nov 24, 2014 at 10:29:02PM +0300, Gleb Smirnoff wrote: > R> > On Mon, Nov 24, 2014 at 06:03:56PM +0000, Ruslan Bukin wrote: > R> > R> > I this on stock kernel or on kernel with your modifications ? > R> > R> > R> > R> Stock one. I also checked with no virtio but MDROOT - same problems. > R> > > R> > I could expect a panic with a damaged 'struct buf', but not vm_page. > R> > > R> > Can you please do a clean build pre-r274914, and then again a clean > R> > build of r274914, and then confirm that the former is stable, but the > R> > latter panics? > R> > R> Yes, I just proceeded re-check both builds with removing obj dir each time and I still see the problem starting with r274914. > R> > R> Also restoring files like that on latest head makes things happy (no panics): > R> svnlite up -r274913 sys/kern/vfs_default.c sys/kern/vnode_if.src sys/sys/buf.h sys/sys/vnode.h sys/ufs/ffs/ffs_vnops.c sys/vm/swap_pager.c sys/vm/vm_pager.h sys/vm/vnode_pager.c sys/vm/vnode_pager.h > > Can you please try to un-union the struct buf and see if it helps? > Hi, Un-unioning helps partially: I receive much less panics and able to boot until login prompt in ~ 1/3 attempts with patch attached. Ruslan --uAKRQypu60I7Lcqm Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="buf.patch" Index: sys/sys/buf.h =================================================================== --- sys/sys/buf.h (revision 275031) +++ sys/sys/buf.h (working copy) @@ -107,6 +107,7 @@ off_t b_offset; /* Offset into file. */ TAILQ_ENTRY(buf) b_bobufs; /* (V) Buffer's associated vnode. */ uint32_t b_vflags; /* (V) BV_* flags */ + TAILQ_ENTRY(buf) b_freelist; /* (Q) Free list position inactive. */ unsigned short b_qindex; /* (Q) buffer queue index */ uint32_t b_flags; /* B_* flags. */ b_xflags_t b_xflags; /* extra flags */ @@ -123,16 +124,11 @@ struct ucred *b_rcred; /* Read credentials reference. */ struct ucred *b_wcred; /* Write credentials reference. */ void *b_saveaddr; /* Original b_addr for physio. */ - union { - TAILQ_ENTRY(buf) bu_freelist; /* (Q) */ - struct { - void (*pg_iodone)(void *, vm_page_t *, int, int); - int pg_reqpage; - } bu_pager; - } b_union; -#define b_freelist b_union.bu_freelist -#define b_pager b_union.bu_pager - union cluster_info { + struct pager_info { + void (*pg_iodone)(void *, vm_page_t *, int, int); + int pg_reqpage; + } b_pager; + struct cluster_info { TAILQ_HEAD(cluster_list_head, buf) cluster_head; TAILQ_ENTRY(buf) cluster_entry; } b_cluster; --uAKRQypu60I7Lcqm--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141125122754.GA57252>