Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern micro-optimisation - if we're going to return 0, do...
details: https://anonhg.NetBSD.org/src/rev/713e63fd4f62
branches: trunk
changeset: 558676:713e63fd4f62
user: dan <dan%NetBSD.org@localhost>
date: Sun Feb 22 01:00:41 2004 +0000
description:
micro-optimisation - if we're going to return 0, do so before doing
other unnecessary work
diffstat:
sys/kern/vfs_bio.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (34 lines):
diff -r c9b1ad735820 -r 713e63fd4f62 sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c Sun Feb 22 00:26:43 2004 +0000
+++ b/sys/kern/vfs_bio.c Sun Feb 22 01:00:41 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_bio.c,v 1.117 2004/02/19 03:56:30 atatat Exp $ */
+/* $NetBSD: vfs_bio.c,v 1.118 2004/02/22 01:00:41 dan Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -81,7 +81,7 @@
#include "opt_softdep.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.117 2004/02/19 03:56:30 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.118 2004/02/22 01:00:41 dan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -430,12 +430,12 @@
LOCK_ASSERT(simple_lock_held(&bqueue_slock));
+ if (bufmem < bufmem_lowater)
+ return 0;
+
TAILQ_FOREACH(bp, &bufqueues[BQ_AGE], b_freelist)
ninvalid += bp->b_bufsize;
- if (bufmem < bufmem_lowater)
- return 0;
-
pagedemand = uvmexp.freetarg - uvmexp.free;
if (pagedemand < 0)
return ninvalid;
Home |
Main Index |
Thread Index |
Old Index