1. 05 Jan, 2003 34 commits
    • Andrew Morton's avatar
      [PATCH] infrastructure for handling radix_tree_node allocation · 9fb6fde9
      Andrew Morton authored
      radix_tree_node_alloc() uses GFP_ATOMIC, under spinlocking.  If the
      allocation fails then userspace sees ENOMEM and application failure occurs.
      
      A single add_to_page_cache() will require up to six radix_tree_nodes on
      32-bit machines, twice this on 64-bit machines (quadruple the worst-case
      storage on 64-bit).
      
      My approach to solving this problem is to create a per-cpu pool of
      preallocated radix_tree_nodes, private to the radix-tree code.
      
      The radix-tree user will call the new radix-tree API function
      radix_tree_preload() to ensure that this pool has sufficient nodes to cover
      the worst-case.  radix_tree_preload() should be called outside locks, with
      GFP_KERNEL so that it can run page reclaim.
      
      If it succeeds, radix_tree_preload() will return with preemption disabled so
      that the per-cpu radix_tree_node pool is protected.  The user must call
      radix_tree_preload_end() to terminate the transaction.
      
      In the common case, the per-cpu pools will never be touched:
      radix_tree_insert() will only dip into the pool if kmem_cache_alloc() fails.
      The pools will remain full at all times.  This is to optimise the fastpath -
      it is just a few instructions.
      
      This patch also removes the now-unneeded radix-tree mempool.  This saves 130
      kbytes of permanently allocated kernel memory.  260k on 64-bit platforms.
      9fb6fde9
    • Andrew Morton's avatar
      [PATCH] handle pte_chain_alloc() failures · aaf2ef19
      Andrew Morton authored
      Update page_add_rmap() callers to allocate their own pte_chain structures,
      and to pass those into page_add_rmap().
      
      The swapoff path has not yet been updated and is still oopsable.  The locking
      there is tricky.
      aaf2ef19
    • Andrew Morton's avatar
      [PATCH] infrastructure for handling pte_chain_alloc() failures · a3a31a5e
      Andrew Morton authored
      The VM allocates pte_chains with GFP_ATOMIC, under deep locking.  If that
      allocation fails, we oops.
      
      My approach to solving this is to require that the caller of page_add_rmap()
      pass in a pte_chain structure for page_add_rmap() to use.  Then, callers can
      arrange to allocate that structure outside locks with GFP_KERNEL.
      
      This patch provides the base infrastructure.
      
      A common case is that page_add_rmap() will in fact not consume the pte_chain,
      because an empty slot was found within one of the page's existing pte_chain
      structures.  So this patch provides for a special one-deep per-cpu pte_chain
      cache to optimise this case of taking just one pte_chain and then immediately
      putting it back.
      
      We end up adding maybe 20-30 instructions to the pagefault path to handle the
      eventuality of pte_chain allocation failures.
      
      Lots of other design ideas were considered.  This is the best I could come up
      with.
      a3a31a5e
    • Andrew Morton's avatar
      [PATCH] copy_page_range: minor cleanup · 4d9ebed4
      Andrew Morton authored
       - Don't evaluate pfn_to_page(pte_pfn(pte)) twice.
      
       - adjust whitespace
      
       - rename inner variable `ptepage' to `page'.  It's more logical, and
         reduces collisions with the shared pagetable patch (which has to rename it
         anyway, because it adds a `ptepage' which really is "the page which holds
         ptes").
      4d9ebed4
    • Andrew Morton's avatar
      [PATCH] 3c59x: 3c920 support · 96688ef6
      Andrew Morton authored
      Patch from Urban Widmark <Urban.Widmark@enlight.net>
      
      Adds support for the 3c920, which appears to be the same as a 3c905C.
      96688ef6
    • Andrew Morton's avatar
      [PATCH] misc fixes · 7dcb98cc
      Andrew Morton authored
       - fix starfire.c printk compile warning (dma_addr_t can be 64 bit) (Martin
         Bligh)
      
       - Remove an ifdef from the scheduler
      7dcb98cc
    • Andrew Morton's avatar
      [PATCH] devfs mount-time readdir fix and cleanup · 07ce6ac0
      Andrew Morton authored
      Patch from Adam J. Richter <adam@yggdrasil.com> and
                 Milton Miller <miltonm@bga.com>
      
      There's some init-time code which is supposed to read a devfs directory by
      expanding the bufer until the whole directory fits.  But the logic is wrong
      and it only works if the whole directory fits into 512 bytes.
      
      So fix that up, and also clean up some coding in there, and rationalise the
      duplicated definition of linux_dirent64.
      07ce6ac0
    • Andrew Morton's avatar
      [PATCH] move LOG_BUF_SIZE to header/config · 0d5f0a37
      Andrew Morton authored
      Patch from "Randy.Dunlap" <rddunlap@osdl.org>
      
      Convert the selection of LOG_BUF_SIZE from an ifdef tangle in
      printk.c into config logic.
      0d5f0a37
    • Neil Brown's avatar
      [PATCH] md: Record location of incomplete resync at shutdown and restart from there. · dc50fd2c
      Neil Brown authored
      Add a new field to the md superblock, in an used area, to record where
      resync was up-to on a clean shutdown while resync is active.  Restart from
      this point.
      
      The extra field is verified by having a second copy of the event counter.
      If the second event counter is wrong, we ignore the extra field.
      
      This patch thanks to  Angus Sawyer <angus.sawyer@dsl.pipex.com>
      dc50fd2c
    • Neil Brown's avatar
      [PATCH] md: Make MD device-is-idle test check whole device, not partition. · 2aa80952
      Neil Brown authored
      When resyncing an array, md will back off if it detects other
      activity on the device.  This used to be based on the whole
      device, not the partition, but recent changes made it only
      check IO on the partition.
      
      This patch causes all sync_io accounting to be done on the
      whole device (bdev->bd_contains).
      2aa80952
    • Neil Brown's avatar
    • Neil Brown's avatar
      [PATCH] knfsd: NFSv4 server fixes · fc70014e
      Neil Brown authored
      Assorted fixes particularly related to handling the new style
      xdr_buf buffers for NFSv4 server
      fc70014e
    • Neil Brown's avatar
      [PATCH] knfsd: Use hash_long from hash.h for hashing in rpc/svc caches. · ec6867b3
      Neil Brown authored
      It works much better than my little toy hash functions.
      ec6867b3
    • Neil Brown's avatar
      [PATCH] knfsd: Add 'threads' file to nfsd filesystem to allow changing number of threads. · bb1eb94c
      Neil Brown authored
      This uses the read-without-write style transaction files in nfsctl.
      We can write a number of threads, and then read back the number of
      threads that resulted, or we can just open and read in which case
      we read back the number of threads without changing it.
      bb1eb94c
    • Neil Brown's avatar
      [PATCH] knfsd: Add 'filehandle' entry for nfsd filesystem for looking up a filehandle · 9838159a
      Neil Brown authored
      The getfh system call takes an IP address, which is only
      really appropriate for AUTH_UNIX authentication.
      
      With this interface, you call can ask for a filehandle for a
      particular domain.
      
      You write
       domainname pathname maxlength
      to the file, and then read back the filehandle
      
      All strings a qword quoted.
      9838159a
    • Neil Brown's avatar
      [PATCH] knfsd: Change names of legacy interfaces in nfsd filesys to start with period · e7f81aa3
      Neil Brown authored
      The nfsd filesystem provides an interface to nfsd.
      Most of the current files should be considered legacy
      interfaces as they are not particularly suitable for
      filesystem interaction, but are required to support the
      syscall interface.
      This patch puts a '.' in front of all the names so they
      appear as hidden names when the directory is listed.
      e7f81aa3
    • Neil Brown's avatar
      [PATCH] knfsd: Fixes for nfsd filesystem files · 71713ecd
      Neil Brown authored
      The transaction files in the 'nfsd' filesystem
      stores the per-transaction response size in the per-inode
      i_size, which is wrong.
      With this patch a page is allocated for holding size and
      request and response, so routines don't need to
      copy_fromuser.
      
      Also, some routines were allocating rather large (>1024 bytes)
      stuctures on the stack for copy_fromuser into, which was not
      nice and is now not needed.
      
      Also, writeonly and write_read methods are unified in a single
      transaction style interface.
      Write then read performs and action and returns a response.
      Write without read just performs the action and ignores response.
      Read without write triggers an empty transaction which can still have
      a response.  That functionality will be used in a later patch.
      71713ecd
    • Neil Brown's avatar
      [PATCH] knfsd: Provide 'flush' interface for userspace to flush rpc/svc caches · 50d3bcac
      Neil Brown authored
      Userspace can with a time (seconds since epoch) to
        /proc/net/rpc/*/epoch
      and all entries created earlier than that time will be flushed.
      50d3bcac
    • Neil Brown's avatar
      c03b4375
    • Neil Brown's avatar
      [PATCH] knfsd: Allow rpcsvc caches to provide a 'cache_show' method · 007f7383
      Neil Brown authored
      This provides a /proc/sunrpc/*/content seq_file for caches to display
      their content.
      
      This code is based on the code for /proc/fs/nfs/exports
      007f7383
    • Neil Brown's avatar
      [PATCH] knfsd: rpc/svc auth_unix tidyup · f5a99512
      Neil Brown authored
      Get auth_unix_lookup (maps IP address to clientname)
      to use cache_check instead of checking the various state
      bits manually.
      f5a99512
    • Neil Brown's avatar
      [PATCH] knfsd: Don't assume a reader on an RPC cache channel at statup. · b1321130
      Neil Brown authored
      Each cache channel remembers if there was a reader recently.
      If there wasn't, then it doesn't bother with an up-call.
      Currently, it initialises thinking there was a reader
      recently incase the reader starts shortly afterwards.  However
      this causes problems when a reader doesn't start soon, and
      isn't necessary as the reader can easily be started before
      the cache is initialised (e.g. before nfsd is started).
      b1321130
    • Neil Brown's avatar
    • Neil Brown's avatar
      [PATCH] knfsd: Fix some bugs in qword management. · c32718fd
      Neil Brown authored
      1/ converting to hex wasn't quite right
      2/ make sure that decoding into the buffer holding
         original message works ok.
      c32718fd
    • Neil Brown's avatar
      5d28552e
    • Neil Brown's avatar
      [PATCH] knfsd: Avoid opps when NFSD decodes bad filehandle · f64652e1
      Neil Brown authored
      If an NFSv3 request claims an enourmous filehandle, we can believe
      it and oops.  The test should be unsigned...
      f64652e1
    • Luca Barbieri's avatar
      [PATCH] Introduce TIF_IRET and use it to disable sysexit · b10bf295
      Luca Barbieri authored
      This patch introduces a new flag called TIF_IRET and uses it in place
      of TIF_SIGPENDING when that flag is used to force return via iret.
      
      This avoids the overhead of calling do_signal and makes the code
      easier to understand.
      b10bf295
    • Luca Barbieri's avatar
      [PATCH] Fix sysenter (%ebp) fault handling · a7df6f33
      Luca Barbieri authored
      Currently syscall_badsys is called to handle faults when reading the
      sixth parameter in sysenter; however that routine assumes that
      registers have already been pushed on the stack, and this is not the
      case (in other words, it will currently try to pop beyond the end of
      the thread stack).
      
      This patch adds a new "function", syscall_fault, that saves register
      and returns.
      
      The return value is changed to EFAULT, which seems more appropriate
      than ENOSYS.
      a7df6f33
    • Linus Torvalds's avatar
      Merge home.transmeta.com:/home/torvalds/v2.5/x86_64 · 2afbee76
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      2afbee76
    • Andi Kleen's avatar
      [PATCH] 2.5.54 AGP driver fixes for x86-64 · b45aba16
      Andi Kleen authored
      This is just to make x86-64 boot with IOMMU and compiled in AGP driver
      again.  Previously both AGP and the IOMMU code would set up an aperture,
      with AGP being winner, messing up pci_map_*.
      
      This is needed for the x86-64 update for 2.5.54 I sent earlier.
      
      Actually using /dev/agpgart still corrupts memory unfortunately, haven't
      tracked that down yet.
      
      I also commented on some (usually 64bit, but at least one 32bit) bugs in
      the driver too.
      
      These changes should be all nops on i386.
      
       - Export amd k8 init function for x86-64.  It needs to be called early
         by the iommu code.  Add some comments to warn about about that (the
         upcoming VIA and SIS K8 chipsets will have the same problem)
       - Declare gatt table as u32 following the AGP spec.
       - Comment some bugs.
      b45aba16
    • Andi Kleen's avatar
      [PATCH] x86-64 updates for 2.5.54 · 717db2f9
      Andi Kleen authored
      More x86-64 updates for 2.5.54.  Most noticeable change is that the
      64bit X server works again.
      
      This only changes x86-64 specific files.  It requires some AGP driver
      changes I'm sending separately.
      
       - Some Makefile cleanups from Sam Ravnborg
       - Make sure extended registers in 32bit processes are zeroed and not
         accessible/changeable from ptrace.  This is to avoid potential
         security bugs with non 64bit clean 32bit emulation functions (they
         often are overflow prone etc.)
       - Some 32bit emulation cleanups from Stephen Rothwell
       - Make copy_*_user source const to fix warnings.
       - Set fs/gs to dummy values when the 64bit segment base is set to not
         confuse the context switch (Karsten Keil, me)
      	* still one mysterious bug in this area unfortunately.
       - Make MAP_32BIT for 64bit processes only map in the first 31bit,
         because it is usually used to map small model code.  This fixes the X
         server crashes.  Some cleanups in this area.
       - Don't set O_LARGEFILE for 32bit open
       - Handle ptregs calls from 32bit syscall correctly.
       - Implement aio io_getevents for 32bit.
       - Remove buggy unused command handler in nfsd 32bit emulation.
       - Convert timespec in semtimedop (thanks to Anton for telling me about
         this)
       - Ignore long mode flag from 32bit modify_ldt.  This fixes Wine, which
         left it uninitialized (bug found by Karsten Keil)
       - Merge with i386
       - Handle new kallsyms
       - Remove some superfluous bootup printks
      717db2f9
    • Linus Torvalds's avatar
      Merge http://linux-scsi.bkbits.net/scsi-for-linus-2.5 · 4249e4ba
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      4249e4ba
    • James Bottomley's avatar
      Merge raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5 · 755b8d21
      James Bottomley authored
      into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.5
      755b8d21
    • Andries E. Brouwer's avatar
      [PATCH] scsi_scan.c · 3cf172fe
      Andries E. Brouwer authored
      Wondering why my CD-writer did not have a name in sysfs, I saw
      that when the name is longer than 50 bytes no name at all is used.
      The (much smaller) code below constructs a truncated name instead.
      3cf172fe
  2. 04 Jan, 2003 6 commits