Date: Mon, 18 Sep 2017 20:16:33 +0000 From: bugzilla-noreply@freebsd.org To: gecko@FreeBSD.org Subject: [Bug 222356] www/firefox: file-backed shared memory performance Message-ID: <bug-222356-21738-k8oJ9bCGPj@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-222356-21738@https.bugs.freebsd.org/bugzilla/> References: <bug-222356-21738@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222356 --- Comment #10 from Tijl Coosemans <tijl@FreeBSD.org> --- (In reply to Konstantin Belousov from comment #9) That makes Firefox usable again, thanks. There's still some disk I/O that seems too much to be just metadata, but I could be wrong about that. If I add a call to fsync before close in the test program above there's sti= ll a lot of disk I/O that is fixed by the patch below but it made no difference = on Firefox. The only other thing I can think of is that write(2) on an unlink= ed file still goes straight to the file system, but a patch for that wasn't immediately obvious to me. I've added the backtrace below. Index: sys/kern/vfs_syscalls.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/kern/vfs_syscalls.c (revision 323578) +++ sys/kern/vfs_syscalls.c (working copy) @@ -3346,6 +3346,8 @@ kern_fsync(struct thread *td, int fd, bool fullsync) if (error !=3D 0) return (error); vp =3D fp->f_vnode; + if ((vp->v_vflag & VV_NOSYNC) !=3D 0) + goto drop; #if 0 if (!fullsync) /* XXXKIB: compete outstanding aio writes */; db> t 982 Tracing pid 982 tid 100143 td 0xfffff800049b8560 sched_switch() at sched_switch+0x263/frame 0xfffffe0096d7d310 mi_switch() at mi_switch+0xd4/frame 0xfffffe0096d7d340 sleepq_wait() at sleepq_wait+0x3a/frame 0xfffffe0096d7d370 _sleep() at _sleep+0x22d/frame 0xfffffe0096d7d3f0 waitrunningbufspace() at waitrunningbufspace+0x77/frame 0xfffffe0096d7d410 bufwrite() at bufwrite+0x199/frame 0xfffffe0096d7d450 cluster_wbuild() at cluster_wbuild+0x7dd/frame 0xfffffe0096d7d500 cluster_write() at cluster_write+0x5da/frame 0xfffffe0096d7d5e0 ffs_write() at ffs_write+0x3e2/frame 0xfffffe0096d7d680 VOP_WRITE_APV() at VOP_WRITE_APV+0x103/frame 0xfffffe0096d7d790 vn_write() at vn_write+0x1b6/frame 0xfffffe0096d7d810 vn_io_fault1() at vn_io_fault1+0x168/frame 0xfffffe0096d7d950 vn_io_fault() at vn_io_fault+0x189/frame 0xfffffe0096d7d9c0 dofilewrite() at dofilewrite+0x89/frame 0xfffffe0096d7da10 kern_writev() at kern_writev+0x68/frame 0xfffffe0096d7da60 sys_write() at sys_write+0x86/frame 0xfffffe0096d7dab0 amd64_syscall() at amd64_syscall+0x562/frame 0xfffffe0096d7dbf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0096d7dbf0 --- syscall (4, FreeBSD ELF64, sys_write), rip =3D 0x80099660a, rsp =3D 0x7fffffffea88, rbp =3D 0x7fffffffeaf0 --- db> show lockedvnods Locked vnodes vnode 0xfffff800686793b0: tag ufs, type VREG usecount 1, writecount 1, refcount 546 mountedhere 0 flags (VV_NOSYNC|VI_ACTIVE) v_object 0xfffff80068684870 ref 0 pages 4352 cleanbuf 543 dirtybuf 1 lock type ufs: EXCL by thread 0xfffff800049b8560 (pid 982, nosync, tid 100143) ino 3945559, on dev ada0p5 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222356-21738-k8oJ9bCGPj>