1. 09 Mar, 2003 5 commits
    • Andi Kleen's avatar
      [PATCH] Fast path context switch - microoptimize FPU reload · 916d2b26
      Andi Kleen authored
      Following some changes on x86-64.
      
      When cpu_has_fxsr is defined to 1 like in many kernels unlazy_fpu can
      collapse to three instructions. For that inlining is a very good idea.
      Otherwise it's 10 instructions or so, which can be still inlined.
      
      We don't need the lock prefix to test our local thread flags state.
      Unfortunately test_thread_flag currently always uses test_bit which
      has a LOCK on SMP, but that's unnecessary. LOCK is costly on P4,
      so it's a good idea to avoid it.
      
      Work around this for now by testing directly. Better would be
      probably to define __set_bit for all architectures to not guarantee
      atomicity and then always use that for local thread_info accesses
      in linux/thread_info.h
      916d2b26
    • John Levon's avatar
      [PATCH] fix oprofile on x86 > 1 counter · 106d4087
      John Levon authored
      Without this we have a choice between dropping lots of counter events
      for counters > 0, or getting dazed and confused.  This brings it inline
      with the 2.4 module code.  Tested on my 2-way.
      
      Also fix a typo from Steven Cole, and remove some unnecessary code
      106d4087
    • Linus Torvalds's avatar
      Merge http://linux-scsi.bkbits.net/scsi-for-linus-2.5 · 106e95f1
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      106e95f1
    • James Bottomley's avatar
      Merge raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5 · 03977d26
      James Bottomley authored
      into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.5
      03977d26
    • Linus Torvalds's avatar
      Merge bk://linux-dj.bkbits.net/cpufreq · 055f27cd
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      055f27cd
  2. 08 Mar, 2003 35 commits
    • Martin J. Bligh's avatar
      [PATCH] NUMA scheduler fixup · f8546efb
      Martin J. Bligh authored
      From: Ingo Molnar <mingo@elte.hu>
      
      This cleans up the NUMA scheduler to have separate triggers for idle
      and busy rebalance ratio, preventing some complex interactions where
      idle cpus can cause busy ones to busy rebalance more often. The core
      functionality of this patch is rebalace_tick().
      
      Tested in -mjb tree for over 1 month ... no problems at all found -
      retested on top of 64-bk3 with new scheduler updates.
      f8546efb
    • Andrew Morton's avatar
      [PATCH] fix a warning in eepro100.c · 5871d7a1
      Andrew Morton authored
      Remove the unneeded forward declaration of eepro100_remove_one().
      
      It is defeating the __attribute__(unused) tag on the definition of
      eepro100_remove_one() and is causing a "defined but not used" warning.
      5871d7a1
    • Andrew Morton's avatar
      [PATCH] revert the "remove kernel_flag" patch · d7ed858e
      Andrew Morton authored
      With CONFIG_SMP=n, CONFIG_PREEMPT=y, CONFIG_DEBUG_SPINLOCK=y we get many
      undefined refs to kernel_flag.
      
      This is because spinlock debugging works on uniprocessor kernels now, and it
      stores state inside the spinlock structure to do this.
      
      Having working spinlock debugging on UP kernels seems more important than
      saving four bytes, so...
      d7ed858e
    • Andrew Morton's avatar
      [PATCH] remove compile warning from serial console initcall · 09d468ed
      Andrew Morton authored
      Patch from: "Martin J. Bligh" <mbligh@aracnet.com>
      
      This tiny patch removes the new compiler warning from my build - the new
      console_initcall mechanism seems to require int from console_init ...  I made
      serial8250_console_init look like con_init
      09d468ed
    • Andrew Morton's avatar
      [PATCH] rpc_delete_timer race fix · 24b6f31e
      Andrew Morton authored
      Patch from Ulrich Weigand <weigand@immd1.informatik.uni-erlangen.de>
      
      Fix a race wherein timer_pending() returns false, but the timer handler is
      actually running on another CPU.  We need to call del_timer_sync()
      regardless, so we wait for completion of the handler.
      24b6f31e
    • Andrew Morton's avatar
      [PATCH] missing spin_unlock() in sysfs_remove_dir() · 4398ab46
      Andrew Morton authored
      missing spin_unlock() in sysfs_remove_dir()
      4398ab46
    • Andrew Morton's avatar
      [PATCH] raw.c: dev_t cleanup and oops fix · 0fff81de
      Andrew Morton authored
      Patch from Andries.Brouwer@cwi.nl
      
      The next patch in the dev_t series eliminates the last applied use
      of MAX_BLKDEV - only the definition in major.h remains.
      
      Sneaky as I am, I combine this patch with the fix for an Oops:
      On open, raw_open does
      	filp->f_dentry->d_inode->i_mapping =
      		bdev->bd_inode->i_mapping;
      storing a pointer to bdev stuff.
      But on release this pointer stayed, the block device is not
      referenced anymore and disappears, and the next open references
      undefined stuff.
      I checked, and this can actually cause an Oops - scenario:
      
        # raw /dev/raw/raw12 /dev/hdf
        # dd if=/dev/raw/raw12 of=/dev/null bs=512 count=1
        # raw /dev/raw/raw12 0 0
        # dd if=/dev/raw/raw12 of=/dev/null bs=512 count=1
      
      Oops.
      
      More precisely the problem is that dentry_open does
      file_ra_state_init(&f->f_ra, inode->i_mapping);
      And file_ra_state_init uses mapping->backing_dev_info->ra_pages.
      Ugly, to use so much information about the inode even before
      the inode has been opened.
      
      In the patch below I reset i_mapping upon release of the raw device.
      
      akpm: I fixed a typo and exported default_backing_dev_info to GPL modules for
      this.
      0fff81de
    • Andrew Morton's avatar
      [PATCH] Disable the "Unknown IO_APIC" message · 5c0d76c6
      Andrew Morton authored
      This message is the source of 90% of the traffic on linux-smp and is now
      starting to fill up kernel bugzilla.
      
      Nobody has ever actually done anything about it and the message is wasting
      people's time.  Ingo acked this change.
      5c0d76c6
    • Andrew Morton's avatar
      [PATCH] Larger buffer for /proc/interrupts display · 616862dc
      Andrew Morton authored
      Patch from Zwane Mwaikambo <zwane@linuxpower.ca>
      
      Scale the buffer which is used for accumulating the /proc/interrupts output.
      On large SMP it overflows.
      616862dc
    • Andrew Morton's avatar
      [PATCH] fix SMP lockup in eepro100 with ethtool on unused · 260a4381
      Andrew Morton authored
      Patch from Jason Lunz <lunz@falooley.org>
      
      When support for the GSET and SSET ethtool ioctls was added to eepro100.c in
      2.4.20, the tx lock was overloaded to serialize their use.  Unfortunately,
      this lock is only initialized in dev->open(), causing ethtool to deadlock the
      machine when used on an unconfigured eepro100 interface.
      
      The fix is to initialize the spinlock at probe time.
      260a4381
    • Andrew Morton's avatar
      [PATCH] i386 show_interrupts() fix · 29aaccfb
      Andrew Morton authored
      show_interrupts() is accidentally modifying the incoming seq_file pointer.
      It goes oops if seq_printf() returns non-zero.
      29aaccfb
    • Andrew Morton's avatar
      [PATCH] protect 'action' in show_interrupts · ac84c974
      Andrew Morton authored
      Patch from Zwane Mwaikambo <zwane@linuxpower.ca>
      
      On SMP or preemptible kernels, every instance of show_interrupts() is oopsily
      racy wrt request_irq() and free_irq().
      
      Fix that up by taking the irq_desc_t's lock while walking the action list.
      ac84c974
    • Andrew Morton's avatar
      [PATCH] Extended attribute sharing and debug macro typo fixes · f6da87ca
      Andrew Morton authored
      Patch from Andreas Gruenbacher <agruen@suse.de>
      
      Tony Dziedzic has found two bugs in the extended attributes code. Patches with
      explanations are attached.
      
      1: Extended attribute sharing on ext2/ext3 not working
      
         The mb_cache_entry_insert function constantly returns an -EBUSY error
         instead of 0, which causes the xattr cache that is needed by the xattr
         sharing mechanism on ext2/ext3 to not share anything.  This patch fixes
         the problem.  (It is possible that after applying this fix we will hit
         bugs in code that wasn't used before.)
      
      2: Oops in one of the xattr debug statements: The old_bh variable is NULL
         if an inode that previously had no EA's assigned would share an EA block
         with another inode.  (This was hidden by the xattr sharing bug).
      f6da87ca
    • Andrew Morton's avatar
      [PATCH] fix memory leak in load_elf_binary() · 3ed88a51
      Andrew Morton authored
      - Fix an error-path leak of memory and a dentry in load_elf_binary()
        (spotted by Oleg Drokin).
      
      - Tidy up the handling of bad executable images: return -ENOEXEC rather
        than 0.  (We've committed suicide anyway, so probably nobody gets to see
        this).
      
      - Fix up the logic in load_aout_interp().  It gets itself all set up to
        return -ENOEXEC but there is in fact no path by which it can do this.  Just
        return ~0UL on errors, like load_elf_interp().
      3ed88a51
    • Andrew Morton's avatar
      [PATCH] ext2: fix error-path double-free · a54785ce
      Andrew Morton authored
      Fix a double-kfree on an ext2 error path.  Reported by Oleg Drokin.
      a54785ce
    • Andrew Morton's avatar
      [PATCH] hugetlb unmap_vmas() SMP && PREEMPT fix · f4d55ef3
      Andrew Morton authored
      Patch from Kevin Pedretti <pedretti@ieee.org>
      
      The unmap_vmas() logic is designed to chew away at all the pages without
      holding off preemption for too long.  But with CONFIG_SMP=y and
      CONFIG_PREEMPT=y the number of pages which we batch up between rescheduling
      opportunities is not a multiple of HPAGE_SIZE.  So unmap_vmas() ends up
      calling unmap_hugepage_range() with a poorly aligned&sized region, and it
      goes BUG.
      
      Fix that up by ensuring that we always work across hugepage regions in
      HPAGE_SIZE chunks.
      f4d55ef3
    • Andrew Morton's avatar
      [PATCH] usercopy checks in old_readdir() · 4d580698
      Andrew Morton authored
      Fix up some unchecked copy_to_user()s
      4d580698
    • Andrew Morton's avatar
      [PATCH] fix div-by-zero in bonding.c · de88f07f
      Andrew Morton authored
      Patch from: Shmulik Hen <hshmulik@intel.com>
      
      The following patch fixes a division by zero bug in the bonding module that
      happens when transmitting through a bond with no slaves, in the XOR bonding
      mode.
      de88f07f
    • Andrew Morton's avatar
      [PATCH] move CONFIG_SWAP around · fc60971f
      Andrew Morton authored
      Patch from Tom Rini <trini@kernel.crashing.org>
      
      Take CONFIG_SWAP out of the top-level menu into the general setup menu.  Make
      it dependent on CONFIG_MMU and common to all architectures.
      fc60971f
    • Andrew Morton's avatar
      [PATCH] Fix copy_page_range()'s handling of invalid pages · e7a88057
      Andrew Morton authored
      Patch from Xavier Bru  <Xavier.Bru@bull.net>
      
      If copy_page_range encounters a pte which maps an invalid pageframe it will
      proceed to try to add an rmap entry against that page.  This causes oopses
      when an application which has mapped an IO device via /dev/mem forks.
      
      Fix that up by correctly skipping the page_add_rmap() for these pte's.
      e7a88057
    • Andrew Morton's avatar
      [PATCH] slab debug: symbolic output in caller tracking · 9f930d75
      Andrew Morton authored
      use print_symbol() to decode the offender's program counter.
      9f930d75
    • Andrew Morton's avatar
      [PATCH] slab debug: track caller program counter · 2bf34c12
      Andrew Morton authored
      Patch from Manfred Spraul <manfred@colorfullife.com>
      
      A patch that records the last kfree caller's program counter
      and prints that if a poison check fails.
      2bf34c12
    • Andrew Morton's avatar
      [PATCH] slab use-after-free detector · 9ec42f94
      Andrew Morton authored
      Patch from Petr Vandrovec <vandrove@vc.cvut.cz>
      
      Modifies check_poison function to not only verify that last byte is
      POISON_END, but also that all preceeding bytes are either POISON_BEFORE or
      POISON_AFTER bytes.
      9ec42f94
    • Andrew Morton's avatar
      [PATCH] Fix vm_area_struct slab corruption · 7a6b4e0d
      Andrew Morton authored
      Patch from Hugh Dickins <hugh@veritas.com>
      
      Hugh's patch fixes vm_area_struct slab corruption due to mremap's move_vma
      mistaking how do_munmap splits vmas in one case.
      
      Neither of us are very happy with it - it is fragile, and obscure.  Hugh will
      revisit this later, but for now it should fix up the potential memory
      corruption.
      7a6b4e0d
    • Andrew Morton's avatar
      [PATCH] Make diskstats per-cpu using kmalloc_percpu · 83bfc5dd
      Andrew Morton authored
      Patch from Ravikiran G Thirumalai <kiran@in.ibm.com>
      
      Makes the disk stats on struct gendisk per-cpu.
      83bfc5dd
    • Andrew Morton's avatar
      [PATCH] Allow VFS readahead to fall to zero · bc858911
      Andrew Morton authored
      Some workloads really, really want to have no readahead.  Databases which are
      perfoming small synchronous I/Os against a file which has extremely poor
      layout.  Any readahead at all is a lose here.
      
      But the current readahead code refuses to adapt that low.
      
      Fix it up so that we can indeed adaptively disable readahead altogether, and
      do not start it again until we have seen max_readahead()'s worth of
      consecutive reads.
      bc858911
    • Andrew Morton's avatar
      [PATCH] Implement sendfile() for NFS · 731cf67c
      Andrew Morton authored
      Patch from Trond Myklebust <trond.myklebust@fys.uio.no>
      
      Implement sendfile() for the NFS client.  This is required for loop-on-NFS
      support.
      731cf67c
    • Andrew Morton's avatar
      [PATCH] fix possible latency in balance_dirty_pages() · 96552156
      Andrew Morton authored
      Tasks which throttle in balance_dirty_pages() will loop until the amount of
      dirty memory falls below the configured dirty_ratio.
      
      This exposes the possibility that one task could be stuck in there for
      arbitrary periods of time due to page dirtying activity by other tasks.
      
      The patch changes the logic so that tasks will break out of the loop if they
      have written enough pages, regardless of the current dirty memory limits.
      
      Here "enough" pages is 1.5x the number of pages which they just dirtied.
      
      If the amount of dirty memory in the machine happens to still exceed
      dirty_ratio (say, due to MAP_SHARED activity) then the task will again
      throttle after dirtying a single page.  But there is now an upper limit on
      the time for which a single task will be captured in balance_dirty_pages().
      96552156
    • Andrew Morton's avatar
      [PATCH] register_blkdev cleanups · 9a64905a
      Andrew Morton authored
      Patch from Andries.Brouwer@cwi.nl
      
      The following patch does the following:
      
      - static const char *blkdevs[MAX_BLKDEV]; disappears
      - get_blkdev_list, (un)register_blkdev, __bdevname
        are moved from block_dev.c to genhd.c
      - the third "fops" parameter of register_blkdev was unused;
        now removed everywhere
      - zillions of places had printk("cannot get major") upon
        error return from register_blkdev; removed all of these
        and inserted a single printk in register_blkdev.
      
      Of course the reason for the patch is that one fixed size
      array is eliminated.
      9a64905a
    • Dave Jones's avatar
      [CPUFREQ] Move pci define to pci_ids.h · 4656c707
      Dave Jones authored
      4656c707
    • Dave Jones's avatar
      [CPUFREQ] update documentation · 208b86fa
      Dave Jones authored
      The sysfs directory where the cpufreq-related files are stored changed due
      to the new device interface code, so the documentation needs to be updated
      accordingly. Also, add some information about the reference counting and the
      exporting of sysfs files by the drivers.
      208b86fa
    • Dave Jones's avatar
      [CPUFREQ] allow cpufreq drivers to export sysfs files · fe3f9d78
      Dave Jones authored
      This patch lets cpufreq drivers export per-CPU files in the cpufreq and
      cpu-specific sysfs directory. As an example, a file
      "scaling_available_frequencies" is added to the p4-clockmod.c driver.
      fe3f9d78
    • Dave Jones's avatar
      [CPUFREQ] add support for ICH4-M chipset in speedstep driver · f913edb4
      Dave Jones authored
      Intel ICH4-M soutbridges use exactly the same register interface for SpeedStep
      as ICH2-M and ICH3-M southbridges -- which makes adding support for this  
      bridge (almost) trivial
      f913edb4
    • Dave Jones's avatar
      [CPUFREQ] updated cpufreq ref-counting and locking scheme · 68b7d00f
      Dave Jones authored
      This patch takes use of the now-working cpufreq_interface.kset and
      cpufreq_policy.kobj to use reference counting within the cpufreq core
      wherever this is more appropriate than the previous approach -- using one
      semaphore. Additionally, the callbacks to the driver modules are protected
      now.
      68b7d00f
    • Dave Jones's avatar
      [CPUFREQ] remove unneeded code · 4efee5ca
      Dave Jones authored
      - no cpufreq driver uses the frequency table helper "setpolicy" any more
        ("target" is much more appropriate for them anyways) - so remove
        that helper
      - all cpufreq drivers use the advanced registration process, so some
        compatibility code can safely be removed. 
      4efee5ca