From owner-freebsd-gecko@freebsd.org Mon Sep 18 20:16:33 2017 Return-Path: Delivered-To: freebsd-gecko@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B727EE043EA for ; Mon, 18 Sep 2017 20:16:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 9F1B47E55B for ; Mon, 18 Sep 2017 20:16:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 9E762E043E9; Mon, 18 Sep 2017 20:16:33 +0000 (UTC) Delivered-To: gecko@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E162E043E8 for ; Mon, 18 Sep 2017 20:16:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C8D67E55A for ; Mon, 18 Sep 2017 20:16:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IKGWHw093643 for ; Mon, 18 Sep 2017 20:16:33 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: gecko@FreeBSD.org Subject: [Bug 222356] www/firefox: file-backed shared memory performance Date: Mon, 18 Sep 2017 20:16:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tijl@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gecko@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 20:16:33 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222356 --- Comment #10 from Tijl Coosemans --- (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.=