kern_shutdown.c (149875) | kern_shutdown.c (150472) |
---|---|
1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 149875 2005-09-08 06:30:05Z truckman $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 150472 2005-09-22 15:34:15Z ups $"); |
39 40#include "opt_kdb.h" 41#include "opt_mac.h" 42#include "opt_panic.h" 43#include "opt_show_busybufs.h" 44#include "opt_sched.h" 45 46#include <sys/param.h> --- 237 unchanged lines hidden (view full) --- 284 register struct buf *bp; 285 int iter, nbusy, pbusy; 286#ifndef PREEMPTION 287 int subiter; 288#endif 289 290 waittime = 0; 291 | 39 40#include "opt_kdb.h" 41#include "opt_mac.h" 42#include "opt_panic.h" 43#include "opt_show_busybufs.h" 44#include "opt_sched.h" 45 46#include <sys/param.h> --- 237 unchanged lines hidden (view full) --- 284 register struct buf *bp; 285 int iter, nbusy, pbusy; 286#ifndef PREEMPTION 287 int subiter; 288#endif 289 290 waittime = 0; 291 |
292 sync(&thread0, NULL); | 292 sync(curthread, NULL); |
293 294 /* 295 * With soft updates, some buffers that are 296 * written will be remarked as dirty until other 297 * buffers are written. 298 */ 299 for (iter = pbusy = 0; iter < 20; iter++) { 300 nbusy = 0; --- 8 unchanged lines hidden (view full) --- 309 if (first_buf_printf) { 310 printf("Syncing disks, buffers remaining... "); 311 first_buf_printf = 0; 312 } 313 printf("%d ", nbusy); 314 if (nbusy < pbusy) 315 iter = 0; 316 pbusy = nbusy; | 293 294 /* 295 * With soft updates, some buffers that are 296 * written will be remarked as dirty until other 297 * buffers are written. 298 */ 299 for (iter = pbusy = 0; iter < 20; iter++) { 300 nbusy = 0; --- 8 unchanged lines hidden (view full) --- 309 if (first_buf_printf) { 310 printf("Syncing disks, buffers remaining... "); 311 first_buf_printf = 0; 312 } 313 printf("%d ", nbusy); 314 if (nbusy < pbusy) 315 iter = 0; 316 pbusy = nbusy; |
317 sync(&thread0, NULL); | 317 sync(curthread, NULL); |
318 319#ifdef PREEMPTION 320 /* 321 * Drop Giant and spin for a while to allow 322 * interrupt threads to run. 323 */ 324 DROP_GIANT(); 325 DELAY(50000 * iter); --- 308 unchanged lines hidden --- | 318 319#ifdef PREEMPTION 320 /* 321 * Drop Giant and spin for a while to allow 322 * interrupt threads to run. 323 */ 324 DROP_GIANT(); 325 DELAY(50000 * iter); --- 308 unchanged lines hidden --- |