Deleted Added
full compact
vfs_bio.c (10228) vfs_bio.c (10358)
1/*
2 * Copyright (c) 1994 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 4 unchanged lines hidden (view full) ---

13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * John S. Dyson.
16 * 4. This work was done expressly for inclusion into FreeBSD. Other use
17 * is allowed if this notation is included.
18 * 5. Modifications may be freely made to this file if the above conditions
19 * are met.
20 *
1/*
2 * Copyright (c) 1994 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 4 unchanged lines hidden (view full) ---

13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * John S. Dyson.
16 * 4. This work was done expressly for inclusion into FreeBSD. Other use
17 * is allowed if this notation is included.
18 * 5. Modifications may be freely made to this file if the above conditions
19 * are met.
20 *
21 * $Id: vfs_bio.c,v 1.58 1995/08/24 13:28:16 davidg Exp $
21 * $Id: vfs_bio.c,v 1.59 1995/08/24 13:59:14 davidg Exp $
22 */
23
24/*
25 * this file contains a new buffer I/O scheme implementing a coherent
26 * VM object and buffer cache scheme. Pains have been taken to make
27 * sure that the performance degradation associated with schemes such
28 * as this is not realized.
29 *

--- 16 unchanged lines hidden (view full) ---

46#include <sys/buf.h>
47#include <sys/mount.h>
48#include <sys/malloc.h>
49#include <sys/resourcevar.h>
50#include <sys/proc.h>
51
52#include <miscfs/specfs/specdev.h>
53
22 */
23
24/*
25 * this file contains a new buffer I/O scheme implementing a coherent
26 * VM object and buffer cache scheme. Pains have been taken to make
27 * sure that the performance degradation associated with schemes such
28 * as this is not realized.
29 *

--- 16 unchanged lines hidden (view full) ---

46#include <sys/buf.h>
47#include <sys/mount.h>
48#include <sys/malloc.h>
49#include <sys/resourcevar.h>
50#include <sys/proc.h>
51
52#include <miscfs/specfs/specdev.h>
53
54/*
55 * System initialization
56 */
57
58static void vfs_update __P((void));
59struct proc *updateproc;
60
61static struct kproc_desc up_kp = {
62 "update",
63 vfs_update,
64 &updateproc
65};
66SYSINIT_KT(update, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, (caddr_t)&up_kp)
67
68
54struct buf *buf; /* buffer header pool */
55struct swqueue bswlist;
56
57void vm_hold_free_pages(struct buf * bp, vm_offset_t from, vm_offset_t to);
58void vm_hold_load_pages(struct buf * bp, vm_offset_t from, vm_offset_t to);
59void vfs_clean_pages(struct buf * bp);
60static void vfs_setdirty(struct buf *bp);
61

--- 1203 unchanged lines hidden (view full) ---

1265 bp != NULL;
1266 bp = bp->b_freelist.tqe_next)
1267 count++;
1268 return (count);
1269}
1270
1271int vfs_update_interval = 30;
1272
69struct buf *buf; /* buffer header pool */
70struct swqueue bswlist;
71
72void vm_hold_free_pages(struct buf * bp, vm_offset_t from, vm_offset_t to);
73void vm_hold_load_pages(struct buf * bp, vm_offset_t from, vm_offset_t to);
74void vfs_clean_pages(struct buf * bp);
75static void vfs_setdirty(struct buf *bp);
76

--- 1203 unchanged lines hidden (view full) ---

1280 bp != NULL;
1281 bp = bp->b_freelist.tqe_next)
1282 count++;
1283 return (count);
1284}
1285
1286int vfs_update_interval = 30;
1287
1273void
1288static void
1274vfs_update()
1275{
1289vfs_update()
1290{
1276 (void) spl0();
1291 (void) spl0(); /* XXX redundant? wrong place?*/
1277 while (1) {
1278 tsleep(&vfs_update_wakeup, PRIBIO, "update",
1279 hz * vfs_update_interval);
1280 vfs_update_wakeup = 0;
1281 sync(curproc, NULL, NULL);
1282 }
1283}
1284

--- 202 unchanged lines hidden ---
1292 while (1) {
1293 tsleep(&vfs_update_wakeup, PRIBIO, "update",
1294 hz * vfs_update_interval);
1295 vfs_update_wakeup = 0;
1296 sync(curproc, NULL, NULL);
1297 }
1298}
1299

--- 202 unchanged lines hidden ---