Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Sep 2005 16:51:43 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/alpha/alpha trap.c src/sys/alpha/osf1 osf1_ioctl.c osf1_misc.c osf1_signal.c src/sys/amd64/amd64 trap.c src/sys/compat/linux linux_socket.c src/sys/compat/svr4 svr4_fcntl.c svr4_ioctl.c svr4_ipc.c svr4_misc.c svr4_signal.c ...
Message-ID:  <200509191651.j8JGphxN060384@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2005-09-19 16:51:43 UTC

  FreeBSD src repository

  Modified files:
    sys/alpha/alpha      trap.c 
    sys/alpha/osf1       osf1_ioctl.c osf1_misc.c osf1_signal.c 
    sys/amd64/amd64      trap.c 
    sys/compat/linux     linux_socket.c 
    sys/compat/svr4      svr4_fcntl.c svr4_ioctl.c svr4_ipc.c 
                         svr4_misc.c svr4_signal.c svr4_stat.c 
                         svr4_stream.c svr4_termios.c svr4_ttold.c 
                         svr4_util.h 
    sys/gnu/fs/ext2fs    ext2_alloc.c 
    sys/i386/i386        trap.c vm86.c 
    sys/ia64/ia64        unaligned.c 
    sys/kern             imgact_elf.c subr_prf.c 
    sys/nfsclient        nfs_socket.c 
    sys/rpc              rpcclnt.c 
    sys/ufs/ffs          ffs_alloc.c 
  Log:
  Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(),
  as they both interact with the tty code (!MPSAFE) and may sleep if the
  tty buffer is full (per comment).
  
  Modify all consumers of uprintf() and tprintf() to hold Giant around
  calls into these functions.  In most cases, this means adding an
  acquisition of Giant immediately around the function.  In some cases
  (nfs_timer()), it means acquiring Giant higher up in the callout.
  
  With these changes, UFS no longer panics on SMP when either blocks are
  exhausted or inodes are exhausted under load due to races in the tty
  code when running without Giant.
  
  NB: Some reduction in calls to uprintf() in the svr4 code is probably
  desirable.
  
  NB: In the case of nfs_timer(), calling uprintf() while holding a mutex,
  or even in a callout at all, is a bad idea, and will generate warnings
  and potential upset.  This needs to be fixed, but was a problem before
  this change.
  
  NB: uprintf()/tprintf() sleeping is generally a bad ideas, as is having
  non-MPSAFE tty code.
  
  MFC after:      1 week
  
  Revision  Changes    Path
  1.124     +2 -0      src/sys/alpha/alpha/trap.c
  1.14      +4 -0      src/sys/alpha/osf1/osf1_ioctl.c
  1.57      +4 -0      src/sys/alpha/osf1/osf1_misc.c
  1.41      +24 -6     src/sys/alpha/osf1/osf1_signal.c
  1.291     +2 -0      src/sys/amd64/amd64/trap.c
  1.60      +2 -0      src/sys/compat/linux/linux_socket.c
  1.36      +4 -2      src/sys/compat/svr4/svr4_fcntl.c
  1.23      +2 -0      src/sys/compat/svr4/svr4_ioctl.c
  1.18      +2 -0      src/sys/compat/svr4/svr4_ipc.c
  1.81      +2 -0      src/sys/compat/svr4/svr4_misc.c
  1.34      +4 -1      src/sys/compat/svr4/svr4_signal.c
  1.21      +2 -0      src/sys/compat/svr4/svr4_stat.c
  1.55      +26 -2     src/sys/compat/svr4/svr4_stream.c
  1.13      +9 -0      src/sys/compat/svr4/svr4_termios.c
  1.15      +24 -0     src/sys/compat/svr4/svr4_ttold.c
  1.10      +4 -1      src/sys/compat/svr4/svr4_util.h
  1.43      +2 -0      src/sys/gnu/fs/ext2fs/ext2_alloc.c
  1.279     +2 -0      src/sys/i386/i386/trap.c
  1.58      +2 -0      src/sys/i386/i386/vm86.c
  1.12      +4 -0      src/sys/ia64/ia64/unaligned.c
  1.164     +6 -0      src/sys/kern/imgact_elf.c
  1.119     +8 -0      src/sys/kern/subr_prf.c
  1.130     +13 -1     src/sys/nfsclient/nfs_socket.c
  1.14      +8 -1      src/sys/rpc/rpcclnt.c
  1.133     +6 -0      src/sys/ufs/ffs/ffs_alloc.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509191651.j8JGphxN060384>