1. 19 Oct, 2004 17 commits
    • William Lee Irwin III's avatar
      [PATCH] move wait ops' contention case completely out of line · bc341c61
      William Lee Irwin III authored
      Move the slow paths of wait_on_bit() and wait_on_bit_lock() out of line.
      Also uninline wake_up_bit() to reduce the number of callsites generated,
      and adjust loop startup in __wait_on_bit_lock() to properly reflect its
      usage in the contention case.
      
      Incremental atop the fastcall and wait_on_bit_lock()/test_and_set_bit()
      fixes.  Successfully tested on x86-64.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      bc341c61
    • William Lee Irwin III's avatar
      [PATCH] eliminate inode waitqueue hashtable · 493267b6
      William Lee Irwin III authored
      Eliminate the inode waitqueue hashtable using bit_waitqueue() via
      wait_on_bit() and wake_up_bit() to locate the waitqueue head associated
      with a bit.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      493267b6
    • William Lee Irwin III's avatar
      [PATCH] eliminate bh waitqueue hashtable · 525b64cd
      William Lee Irwin III authored
      Eliminate the bh waitqueue hashtable using bit_waitqueue() via
      wait_on_bit() and wake_up_bit() to locate the waitqueue head associated
      with a bit.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      525b64cd
    • William Lee Irwin III's avatar
      [PATCH] consolidate bit waiting code patterns · baa896b3
      William Lee Irwin III authored
      Consolidate bit waiting code patterns for page waitqueues using
      __wait_on_bit() and __wait_on_bit_lock().
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      baa896b3
    • William Lee Irwin III's avatar
      [PATCH] standardize bit waiting data type · fd4d36bf
      William Lee Irwin III authored
      Eliminate specialized page and bh waitqueue hashing structures in favor of
      a standardized structure, using wake_up_bit() to wake waiters using the
      standardized wait_bit_key structure.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      fd4d36bf
    • William Lee Irwin III's avatar
      [PATCH] move waitqueue functions to kernel/wait.c · d7988992
      William Lee Irwin III authored
      The following patch series consolidates the various instances of waitqueue
      hashing to use a uniform structure and share the per-zone hashtable among all
      waitqueue hashers.  This is expected to increase the number of hashtable
      buckets available for waiting on bh's and inodes and eliminate statically
      allocated kernel data structures for greater node locality and reduced kernel
      image size.  Some attempt was made to look similar to Oleg Nesterov's
      suggested API in order to provide some kind of credit for independent
      invention of something very similar (the original versions of these patches
      predated my public postings on the subject of filtered waitqueues).
      
      These patches have the further benefit and intention of enabling aio to use
      filtered wakeups by standardizing the data structure passed to wake functions
      so that embedded waitqueue elements in aio structures may be succesfully
      passed to the filtered wakeup wake functions, though this patch series doesn't
      implement that particular functionality.
      
      Successfully stress-tested on x86-64, and ia64 in recent prior versions.
      
      
      This patch:
      
      Move waitqueue -related functions not needing static functions in sched.c
      to kernel/wait.c
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      d7988992
    • Olaf Dabrunz's avatar
      [PATCH] TIOCCONS security · d05dd6d0
      Olaf Dabrunz authored
      The ioctl TIOCCONS allows any user to redirect console output to another
      tty.  This allows anyone to suppress messages to the console at will.
      
      AFAIK nowadays not many programs write to /dev/console, except for start
      scripts and the kernel (printk() above console log level).
      
      Still, I believe that administrators and operators would not like any user
      to be able to hijack messages that were written to the console.
      
      The only user of TIOCCONS that I am aware of is bootlogd/blogd, which runs
      as root.  Please comment if there are other users.
      
      Is there any reason why normal users should be able to use TIOCCONS?
      
      Otherwise I would suggest to restrict access to root (CAP_SYS_ADMIN), e.g. 
      with this patch.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      d05dd6d0
    • Paulo Marques's avatar
      [PATCH] kallsyms data size reduction / lookup speedup · e1039211
      Paulo Marques authored
      This patch is an improvement over my first kallsyms speedup patch posted about
      2 weeks ago.
      
      It changes scripts/kallsyms as to produce a different format for
      kallsyms_names and extra data to speedup lookups.  The compression algorithm
      is quite simple: it uses all the char codes not actually used in symbols to
      build a lookup table that translates these codes into small strings.  For
      instance, in my test runs the code 0xFE was being translated into "acpi_"
      giving a 4 byte save on every translation.
      
      The advantage of this algorithm is that to translate a symbol we only require
      information that is stored on that symbol position, and never need to go back
      on the compressed stream to get information from other symbols.
      
      To give an idea about the benefits of this algorithm here are some benchmark
      results on a P4 2.8GHz with a symbol table with 10000 entries:
      
      kallsyms_lookup average time:
        vanilla           1346.0 us
        speedup             14.4 us
        with this patch      0.5 us
      
      total data produced by scripts/kallsyms:
        uncompressed         169 Kb
        vanilla              134 Kb
        with this patch       91 Kb
      
      (speedup was my latest patch, that only changed the way kallsyms_lookup worked
      and not the data format)
      
      I removed a cond_resched() from the proc/kallsyms handling code path, because
      using stem compression, if the current position went backwards, the hole
      stream would be uncompressed up to the current position.  It seemed that by
      removing this loop it would be safe to remove the conditional reschedule
      altogether.
      
      There is just one catch with this patch: the time it takes to compile the
      kernel goes up just a bit (about 0.8s on a P4 2.8GHz with defconfig).  If this
      delay is not acceptable I can change the compression algorithm so that it can
      use the previous table (calculating a new table is what consumes most of the
      time, and not doing the actual compression) and check to see if it obtains a
      similar compression ratio.  If it does, then this is a sign that the symbol
      patterns haven't changed that much and this table is still good to use.  This
      would not only cut the time down to half on any compilation (because of the 2
      pass symbol build method), but in frequent cases where a developer is
      compiling a single file and linking everything over and over again, the table
      optimization process would never run.
      
      I'm CC'ing Brent Casavant on this email, because last june he sent a patch
      trying a different approach that used a 32 entry symbol cache, because there
      was a problem with the time "top" took to read "proc/<pid>/wchan".  I was
      hopping he would be willing to test this patch and comment on the results.
      Signed-off-by: default avatarPaulo Marques <pmarques@grupopie.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e1039211
    • David Howells's avatar
      [PATCH] implement in-kernel keys & keyring management · e4262f59
      David Howells authored
      The feature set the patch includes:
      
       - Key attributes:
         - Key type
         - Description (by which a key of a particular type can be selected)
         - Payload
         - UID, GID and permissions mask
         - Expiry time
       - Keyrings (just a type of key that holds links to other keys)
       - User-defined keys
       - Key revokation
       - Access controls
       - Per user key-count and key-memory consumption quota
       - Three std keyrings per task: per-thread, per-process, session
       - Two std keyrings per user: per-user and default-user-session
       - prctl() functions for key and keyring creation and management
       - Kernel interfaces for filesystem, blockdev, net stack access
       - JIT key creation by usermode helper
      
      There are also two utility programs available:
      
       (*) http://people.redhat.com/~dhowells/keys/keyctl.c
      
           A comprehensive key management tool, permitting all the interfaces
           available to userspace to be exercised.
      
       (*) http://people.redhat.com/~dhowells/keys/request-key
      
           An example shell script (to be installed in /sbin) for instantiating a
           key.
      Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e4262f59
    • David Howells's avatar
      [PATCH] keys: new error codes for Alpha, MIPS, PA-RISC, Sparc & Sparc64 · 322f317d
      David Howells authored
      The attached patch adds the new error codes I added for key-related errors to
      those archs that don't make use of <asm-generic/errno.h>, including Alpha,
      MIPS, PA-RISC, Sparc and Sparc64.  This is required to compile with
      CONFIG_KEYS on those platforms.
      Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      322f317d
    • David Howells's avatar
      [PATCH] Add some key management specific error codes · c6ac5ab1
      David Howells authored
      Here's a patch to add some new error codes specific to key management.
      Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c6ac5ab1
    • Andrew Morton's avatar
      [PATCH] reiserfs: rename struct key · 6f1afa77
      Andrew Morton authored
      Rename resierfs's `struct key' to `struct reiserfs_key' to avoid namespace
      clashes.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      6f1afa77
    • Matthew Dobson's avatar
      [PATCH] Create nodemask_t · 59356466
      Matthew Dobson authored
      The idea behind this patch is to create a nodemask_t as a node analog of
      cpumask_t.  As NUMA machines become more common, the need for a standard,
      cross-platform bitmap of both online & possible nodes becomes more
      apparent.  We believe we've worked out most of the kinks of the variable
      length bitmap types with the recent cpumask_t patches.  Nodemasks are also
      currently far less widespread than cpumasks.  Further, inclusion at this
      point in the kernel would mean consistency in node handling between 2.6 and
      2.7.
      
      Future goals would be to get rid of the 'numnodes' variable used to count
      the number of online nodes, and replace with node_online_map.  This would
      allow arbitrary node numbering and facilitate node hotplugging.
      
      (Nothing actually uses this yet, but several projects need it, and it does
      model a well-defined physical grouping).
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      59356466
    • Peter Osterlund's avatar
      [PATCH] cdrom: buffer sizing fix · 66d5cab9
      Peter Osterlund authored
      The problem is that some drives fail the "GET CONFIGURATION" command when
      asked to only return 8 bytes.  This happens for example on my drive, which
      is identified as:
      
              hdc: HL-DT-ST DVD+RW GCA-4040N, ATAPI CD/DVD-ROM drive
      
      Since the cdrom_mmc3_profile() function already allocates 32 bytes for the
      reply buffer, this patch is enough to make the command succeed on my drive.
      Signed-off-by: default avatarPeter Osterlund <petero2@telia.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      66d5cab9
    • Peter Osterlund's avatar
      [PATCH] CDRW packet writing support · 2f8e2dc8
      Peter Osterlund authored
      This patch implements CDRW packet writing as a kernel block device.  Usage
      instructions are in the packet-writing.txt file.
      
      A hint: If you don't want to wait for a complete disc format, you can
      format just a part of the disc.  For example:
      
              cdrwtool -d /dev/hdc -m 10240
      
      This will format 10240 blocks, ie 20MB.
      Signed-off-by: default avatarPeter Osterlund <petero2@telia.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      2f8e2dc8
    • Peter Osterlund's avatar
      [PATCH] packet-writing: add credits · a7cbd7da
      Peter Osterlund authored
      Nigel pointed out that the earlier patches contained attributions that
      are not present in this patch. The 2.4 patch contains:
      
        Nov 5 2001, Aug 8 2002. Modified by Andy Polyakov
        <appro@fy.chalmers.se> to support MMC-3 complaint DVD+RW units.
      
      and Nigel changed it to this in his 2.6 patch:
      
        Modified by Nigel Kukard <nkukard@lbsd.net> - support DVD+RW
        2.4.x patch by Andy Polyakov <appro@fy.chalmers.se>
      
      The patch I sent you deleted most of the earlier work and moved the
      rest to cdrom.c, but the comments were not moved over, since the
      earlier authors didn't modify cdrom.c.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      a7cbd7da
    • Peter Osterlund's avatar
      [PATCH] DVD+RW support · ed594d2d
      Peter Osterlund authored
      This patch adds support for using DVD+RW drives as writable block devices.
      
      The patch is based on work from:
      
              Andy Polyakov <appro@fy.chalmers.se> - Wrote the 2.4 patch
              Nigel Kukard <nkukard@lbsd.net> - Initial porting to 2.6.x
      
      It works for me using an Iomega Super DVD 8x USB drive.
      
      
        Nov 5 2001, Aug 8 2002. Modified by Andy Polyakov
        <appro@fy.chalmers.se> to support MMC-3 complaint DVD+RW units.
      
        Modified by Nigel Kukard <nkukard@lbsd.net> - support DVD+RW
        2.4.x patch by Andy Polyakov <appro@fy.chalmers.se>
      
      This patch implements CDRW packet writing as a kernel block device.  Usage
      instructions are in the packet-writing.txt file.
      
      A hint: If you don't want to wait for a complete disc format, you can
      format just a part of the disc.  For example:
      
              cdrwtool -d /dev/hdc -m 10240
      
      This will format 10240 blocks, ie 20MB.
      Signed-off-by: default avatarPeter Osterlund <petero2@telia.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      ed594d2d
  2. 18 Oct, 2004 23 commits