Date: Fri, 30 Jan 2004 10:59:32 +0100 (CET) From: Divacky Roman <xdivac02@stud.fit.vutbr.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/62102: obreak update Message-ID: <200401300959.i0U9xWPZ010734@eva.fit.vutbr.cz> Resent-Message-ID: <200401301000.i0UA0YpV050292@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 62102 >Category: kern >Synopsis: obreak update >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Jan 30 02:00:34 PST 2004 >Closed-Date: >Last-Modified: >Originator: Divacky Roman >Release: FreeBSD 5.2-CURRENT i386 >Organization: home >Environment: System: FreeBSD eva.fit.vutbr.cz 4.9-STABLE FreeBSD 4.9-STABLE #2: Thu Nov 20 11:20:53 CET 2003 root@tereza.fit.vutbr.cz:/home/src/sys/sys-49/compile/EVA i386 >Description: A small speed up of obreak() we needlessly lock and unlock vm_map if new==old in obreak() this removes it netbsd and linux does it the same way... not big imporovement but cannot hurt ;) >How-To-Repeat: apply this patch >Fix: --- vm_unix.c Wed Nov 12 20:45:35 2003 +++ vm_unix.c.new Mon Jan 26 15:22:27 2004 @@ -83,10 +83,15 @@ do_map_wirefuture = FALSE; new = round_page((vm_offset_t)uap->nsize); - vm_map_lock(&vm->vm_map); base = round_page((vm_offset_t) vm->vm_daddr); old = base + ctob(vm->vm_dsize); + + if (new == old) + return 0; + + vm_map_lock(&vm->vm_map); + if (new > base) { /* * Check the resource limit, but allow a process to reduce >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401300959.i0U9xWPZ010734>