1. 12 Apr, 2004 40 commits
    • Andrew Morton's avatar
      [PATCH] ibmlana needs CONFIG_MCA_LEGACY · c9a7032d
      Andrew Morton authored
      From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
      
      IBM LAN Adapter/A driver depends on mca-legacy.
      c9a7032d
    • Andrew Morton's avatar
      [PATCH] cycx_drv.c warning fix. · ed871211
      Andrew Morton authored
      From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
      
      drivers/net/wan/cycx_drv.c: In function `load_cyc2x':
      drivers/net/wan/cycx_drv.c:430: warning: unsigned int format, long unsigned int arg (arg 3)
      ed871211
    • Andrew Morton's avatar
      [PATCH] pmdisk needs asmlinkage · fa736caa
      Andrew Morton authored
      From: Pavel Machek <pavel@ucw.cz>
      
      This function will break with -mregparm, so mark it asmlinkage.
      fa736caa
    • Andrew Morton's avatar
      [PATCH] tda1004x.c var not used. · 4b99e75b
      Andrew Morton authored
      From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
      
      drivers/media/dvb/frontends/tda1004x.c:191: warning: `errno' defined but not used
      4b99e75b
    • Andrew Morton's avatar
      [PATCH] wavefront_synth.c var not used. · e77a6be9
      Andrew Morton authored
      From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>
      
      sound/isa/wavefront/wavefront_synth.c:1923: warning: `errno' defined but not used
      e77a6be9
    • Andrew Morton's avatar
      [PATCH] nfs-32bit-statfs-fix warning fix · f6ff7fe5
      Andrew Morton authored
      With CONFIG_LBD=n:
      
      fs/open.c: In function `vfs_statfs_native':
      fs/open.c:67: warning: comparison is always true due to limited range of data type
      fs/open.c:70: warning: comparison is always true due to limited range of data type
      f6ff7fe5
    • Andrew Morton's avatar
      [PATCH] Fix 32bit statfs on NFS · 678736c9
      Andrew Morton authored
      From: Olaf Kirch <okir@suse.de>
      
      The attached patch fixes a problem with the 32bit statfs call on NFS file
      systems.  Some NFS servers return a value of -1 for the f_files and f_ffree.
      The current code would think this is a 64bit value that cannot be converted
      to 32bits.  Consequently, the system call would always fail.
      
      The patch adds two special if() to detect a value of -1 for f_files and
      f_ffree.
      678736c9
    • Andrew Morton's avatar
      [PATCH] Subject: [PATCH] Fix overflow bug in READDIRPLUS... · a11317b1
      Andrew Morton authored
      From: Trond Myklebust <trond.myklebust@fys.uio.no>
      
      Fixes the Oops reported by Paul Blazejowski.  Bug turned out to be in the page
      overflow checking for READDIRPLUS.
      a11317b1
    • Andrew Morton's avatar
      [PATCH] drivers/base/platform.c typo fix · 1908da86
      Andrew Morton authored
      From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      1908da86
    • Andrew Morton's avatar
      [PATCH] cx88 update. · 6cd80eb7
      Andrew Morton authored
      From: Gerd Knorr <kraxel@bytesex.org>
      
      This is a update for the cx88 driver.  There are *lots* of changes:
      
        * vbi support was added.
        * plenty of fixes for audio support (there are still problems
          through).
        * new cards added.
        * serveral minor tweaks.
      6cd80eb7
    • Andrew Morton's avatar
      [PATCH] v4l: documentation update · d4953f47
      Andrew Morton authored
      From: Gerd Knorr <kraxel@bytesex.org>
      
      This patch updates the documentation for the v4l drivers.
      d4953f47
    • Andrew Morton's avatar
      [PATCH] v4l: bttv driver update · 2b12289c
      Andrew Morton authored
      From: Gerd Knorr <kraxel@bytesex.org>
      
      This patch updates the bttv driver.  Changes:
      
        (1) several card-specific tweaks.
        (2) make software vs. hardware i2c configurable per TV card.
        (3) reinitialize image parameters after chip reset.
        (4) make bttv quite by default on frame drops.
        (5) new insmod option: "debug_latency=1" to enable frame drop
            debug messages.
      
      bttv is quite sensitive to irq latencies, especially when capturing both
      video and vbi.  There are several reports about problems due to this, I don't
      see that on my machines through.  (5) dumps a stracktrace if the driver
      thinks the frame drop is is caused by high latencies as experiment, lets see
      whenever that helps ...
      2b12289c
    • Andrew Morton's avatar
      [PATCH] v4l-saa7134-update fix · ba2fab99
      Andrew Morton authored
      drivers/built-in.o(.text+0x32912b): In function `dsp_buffer_init':
      drivers/media/video/saa7134/saa7134-oss.c:77: undefined reference to `videobuf_dma_init'
      ba2fab99
    • Andrew Morton's avatar
      [PATCH] v4l: saa7134 driver update · 5478e1ce
      Andrew Morton authored
      From: Gerd Knorr <kraxel@bytesex.org>
      
      This is a update for the saa7134 driver.  Changes:
      
        * add cropping support.
        * fix Makefile to build the saa6752hs module.
        * fix locking bug in oss dsp driver.
        * infrared remote keytable update.
        * some card-specific fixes.
      5478e1ce
    • Andrew Morton's avatar
      [PATCH] v4l: add support for pv951 remote to ir-kbd-i2c · df5f63d9
      Andrew Morton authored
      From: Gerd Knorr <kraxel@bytesex.org>
      
      Trivial patch, $subject says all, just a new keytable.
      df5f63d9
    • Andrew Morton's avatar
      [PATCH] v4l: msp3400 update · 3cfba984
      Andrew Morton authored
      From: Gerd Knorr <kraxel@bytesex.org>
      
      This patch allows to use switch to the second external input of the msp34xx
      chips.  Also has some minor cleanups and more verbose debug info.
      3cfba984
    • Andrew Morton's avatar
      [PATCH] v4l: tuner fix · c7d543e9
      Andrew Morton authored
      From: Gerd Knorr <kraxel@bytesex.org>
      
      This patch fixes a bug in the tuner descriptions and prepares for the removal
      of the type= insmod option by printing a warning when it is used.
      c7d543e9
    • Andrew Morton's avatar
      [PATCH] v4l: v4l1-compat fix · 83143486
      Andrew Morton authored
      From: Gerd Knorr <kraxel@bytesex.org>
      
      Minor tweak in the v4l1 compatibility layer: Make sure that capture actually
      is active before going to wait for a frame so we don't block forever.
      83143486
    • Andrew Morton's avatar
      [PATCH] v4l: cropcap ioctl fix · 2e061730
      Andrew Morton authored
      From: Gerd Knorr <kraxel@bytesex.org>
      
      The VIDIOC_CROPCAP ioctl had wrong R/W bits, this patch fixes it.
      2e061730
    • Andrew Morton's avatar
      [PATCH] ACL version mismatch error code fix · d570ea4b
      Andrew Morton authored
      From: Andreas Gruenbacher <agruen@suse.de>
      
      Return EOPNOTSUPP rather than EINVAL when we discover an ACL version
      mismatch.
      d570ea4b
    • Andrew Morton's avatar
      [PATCH] sunrpc: connection dropping tweaks · 620bde45
      Andrew Morton authored
      From: Olaf Kirch <okir@suse.de>
      
      Some NFS clients respond badly to a TCP connection being reset immediately
      after it has been accepted so:
      
      - Accept more connections before starting to drop them
      
      - Always drop the oldest connection - Random Early Drop doesn't really help
        here, and can hurt
      
      - ratelimit the friendly warnings.
      620bde45
    • Andrew Morton's avatar
      [PATCH] add stop_machine barriers · d1e069e2
      Andrew Morton authored
      From: Andrea Arcangeli <andrea@suse.de>
      
      We need a barrier before checking for kthread_should_stop in do_stop.
      d1e069e2
    • Andrew Morton's avatar
      [PATCH] epoll comment fix · 26abb4bd
      Andrew Morton authored
      From: Davide Libenzi <davidel@xmailserver.org>
      
      When I split evenpoll_release() in an inline fast path plus an
      eventpoll_release_file() slow path, I forgot to change comments.
      26abb4bd
    • Andrew Morton's avatar
      [PATCH] build fails on sparc64 in hugetlbpage.c · e0ecc25c
      Andrew Morton authored
      From: Romain Francoise <romain@orebokech.com>
      
      arch/sparc64/mm/hugetlbpage.c does not include linux/module.h so
      EXPORT_SYMBOL prints out warnings, and since sparc64 Makefiles have
      -Werror, the build fails.
      e0ecc25c
    • Andrew Morton's avatar
      [PATCH] ppc64: NUMA fix for 16MB LMBs · 4c886627
      Andrew Morton authored
      From: Olof Johansson <olof@austin.ibm.com>
      
      As discussed on the ppc64 list yesterday and today:
      
      On some ppc64 systems, Open Firmware will give memory device nodes that are
      only 16MB in size, instead of the 256MB that our NUMA code currently
      expects (see MEMORY_INCREMENT in mmzone.h).
      
      Just changing the defines from 256MB to 16MB makes the table blow up from
      32KB to 512KB, so this patch also makes it dynamically allocated based on
      actual memory size.  Since all this is done before (well, during) bootmem
      init so we need to use lmb_alloc().
      
      Finally, there's no need to use a full int for node ID. Current max is 16
      nodes, so a signed char still leaves plenty of room to grow.
      4c886627
    • Andrew Morton's avatar
      [PATCH] procfs LoadAVG/load_avg scaling fix · 9b8696f2
      Andrew Morton authored
      From: Ingo Molnar <mingo@elte.hu>
      
      Dave reported that /proc/*/status sometimes shows 101% as LoadAVG, which
      makes no sense.
      
      the reason of the bug is slightly incorrect scaling of the load_avg value. 
      The patch below fixes this.
      9b8696f2
    • Andrew Morton's avatar
      [PATCH] ia32: 4Kb stacks (and irqstacks) patch · 95f238ea
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      Below is a patch to enable 4Kb stacks for x86. The goal of this is to
      
      1) Reduce footprint per thread so that systems can run many more threads
         (for the java people)
      
      2) Reduce the pressure on the VM for order > 0 allocations. We see real life
         workloads (granted with 2.4 but the fundamental fragmentation issue isn't
         solved in 2.6 and isn't solvable in theory) where this can be a problem.
         In addition order > 0 allocations can make the VM "stutter" and give more
         latency due to having to do much much more work trying to defragment
      
      The first 2 bits of the patch actually affect compiler options in a generic
      way: I propose to disable the -funit-at-a-time feature from gcc.  With this
      enabled (and it's default with -O2), gcc will very agressively inline
      functions, which is nice and all for userspace, but for the kernel this makes
      us suffer a gcc deficiency more: gcc is extremely bad at sharing stackslots,
      for example a situation like this:
      
      if (some_condition)
      	function_A();
      else
      	function_B();
      
      with -funit-at-a-time, both function_A() and _B() might get inlined, however
      the stack usage of both functions of the parent function grows the stack
      usage of both functions COMBINED instead of the maximum of the two.  Even
      with the normal 8Kb stacks this is a danger since we see some functions grow
      3Kb to 4Kb of stack use this way.  With 4Kb stacks, 4Kb of stack usage growth
      obviously is deadly ;-( but even with 8Kb stacks it's pure lottery.
      Disabling -funit-at-a-time also exposes another thing in the -mm tree; the
      attribute always_inline is considered harmful by gcc folks in that when gcc
      makes a decision to NOT inline a function marked this way, it throws an
      error.  Disabling -funit-at-a-time disables some of the agressive inlining
      (eg of large functions that come later in the .c file) so this would make
      your tree not compile.
      
      The 4k stackness of the kernel is included in modversions, so people don't
      load 4k-stack modules into 8k-stack kernels.
      
      At present 4k stacks are selectable in config.  When the feature has settled
      in we should remove the 8k option.  This will break the nvidia modules.  But
      Fedora uses 4k stacks so a new nvidia driver is expected soon.
      95f238ea
    • Andrew Morton's avatar
      [PATCH] acpi printk fix · 124187e5
      Andrew Morton authored
      drivers/acpi/events/evmisc.c: In function `acpi_ev_queue_notify_request':
      drivers/acpi/events/evmisc.c:143: warning: too many arguments for format
      124187e5
    • Andrew Morton's avatar
      [PATCH] Fix logic in filemap_nopage() · 94721b16
      Andrew Morton authored
      The filempa_nopage() logic will go into a tight loop if
      do_page_cache_readahead() doesn't actually start I/O against the target page.
      This can happen if the disk is read-congested, or if the filesystem doesn't
      want to read that part of the file for some reason.
      
      We will accidentally break out of the loop because
      
      	 (ra->mmap_miss > ra->mmap_hit + MMAP_LOTSAMISS)
      
      will eventually become true.
      
      Fix that up.
      94721b16
    • Andrew Morton's avatar
      [PATCH] Honour the readahead tunable in filemap_nopage() · 80b1573f
      Andrew Morton authored
      Remove the hardwired pagefault readaround distance in filemap_nopage() and
      use the per-file readahead setting.
      
      The main reason for this is in fact laptop-mode.  If you want to prevent the
      disk from spinning up then you want all of your application's pages to be
      pulled into memory in one hit.  Otherwise the disk will spin up each time you
      use a new part of whatever application(s) you are running.
      80b1573f
    • Andrew Morton's avatar
      [PATCH] Add commit=0 to ext3, meaning "set commit to default". · 26f14a57
      Andrew Morton authored
      From: Bart Samwel <bart@samwel.tk>
      
      Add support for the value "0" to ext3's "commit" option.  When this value
      is given, ext3 substitutes it by the default commit interval.  Introduce a
      constant JBD_DEFAULT_MAX_COMMIT_AGE for this.
      26f14a57
    • Andrew Morton's avatar
      [PATCH] laptop mode · 93d33a48
      Andrew Morton authored
      From: Bart Samwel <bart@samwel.tk>
      
      Adds /proc/sys/vm/laptop-mode: a special knob which says "this is a laptop".
      In this mode the kernel will attempt to avoid spinning disks up.
      
      Algorithm: the idea is to hold dirty data in memory for a long time, but to
      flush everything which has been accumulated if the disk happens to spin up
      for other reasons.
      
      - Whenever a disk request completes (read or write), schedule a timer a few
        seconds hence.  If the timer was already pending, reset it to a few seconds
        hence.
      
      - When the timer expires, write back the whole world.  We use
        sync_filesystems() for this because it will force ext3 journal commits as
        well.
      
      - In balance_dirty_pages(), kick off background writeback when we hit the
        high threshold (dirty_ratio), not when we hit the low threshold.  This has
        the effect of causing "lumpy" writeback which is something I spent a year
        fixing, but in laptop mode, it is desirable.
      
      - In try_to_free_pages(), only kick pdflush if the VM is getting into
        distress: we want to keep scanning for clean pages, deferring writeback.
      
      - In page reclaim, avoid writing back the odd random dirty page off the
        LRU: only start I/O if the scanning is working harder.
      
      The effect is to perform a sync() a few seconds after all I/O has ceased.
      
      The value which was written into /proc/sys/vm/laptop-mode determines, in
      seconds, the delay between the final I/O and the flush.
      
      Additionally, the patch adds tools which help answer the question "why the
      heck does my disk spin up all the time?".  The user may set
      /proc/sys/vm/block_dump to a non-zero value and the kernel will print out
      information which will identify the process which is performing disk reads or
      which is dirtying pagecache.
      
      The user should probably disable syslogd before setting block-dump.
      93d33a48
    • Andrew Morton's avatar
      [PATCH] kswapd: remove pages_scanned local · 77fe0a19
      Andrew Morton authored
      This is always equal to constant zero.
      77fe0a19
    • Andrew Morton's avatar
      [PATCH] Fix rmap comment · 2d47875a
      Andrew Morton authored
      From: Hugh Dickins <hugh@veritas.com>
      
      rmap's try_to_unmap_one comments on find_vma failure, that a page may
      temporarily be absent from a vma during mremap: no longer, though it is still
      possible for this find_vma to fail, while unmap_vmas drops page_table_lock
      (but that is no problem for file truncation).
      2d47875a
    • Andrew Morton's avatar
      [PATCH] mremap: check map_count · 59da95c4
      Andrew Morton authored
      From: Hugh Dickins <hugh@veritas.com>
      
      mremap's move_vma should think ahead to lessen the chance of failure during
      its rewind on failure: running out of memory always possible, but it's silly
      for it to embark when it's near the map_count limit.
      59da95c4
    • Andrew Morton's avatar
      [PATCH] mremap: vma_relink_file race fix · 2039e7b5
      Andrew Morton authored
      From: Hugh Dickins <hugh@veritas.com>
      
      Subtle point from Rajesh Venkatasubramanian: when mremap's move_vma fails and
      so rewinds, before moving the file-based ptes back, we must move new_vma
      before old vma in the i_mmap or i_mmap_shared list, so that when racing
      against vmtruncate we cannot propagate pages to be truncated back from
      new_vma into the just cleaned old_vma.
      2039e7b5
    • Andrew Morton's avatar
      [PATCH] mremap: move_vma fixes and cleanup · e2ea8374
      Andrew Morton authored
      From: Hugh Dickins <hugh@veritas.com>
      
      Partial rewrite of mremap's move_vma.  Rajesh Venkatasubramanian has pointed
      out that vmtruncate could miss ptes, leaving orphaned pages, because move_vma
      only made the new vma visible after filling it.  We see no good reason for
      that, and time to make move_vma more robust.
      
      Removed all its vma merging decisions, leave them to mmap.c's vma_merge, with
      copy_vma added.  Removed duplicated is_mergeable_vma test from vma_merge, and
      duplicated validate_mm from insert_vm_struct.
      
      move_vma move from old to new then unmap old; but on error move back from new
      to old and unmap new.  Don't unwind within move_page_tables, let move_vma
      call it explicitly to unwind, with the right source vma.  Get the
      VM_ACCOUNTing right even when the final do_munmap fails.
      e2ea8374
    • Andrew Morton's avatar
      [PATCH] mremap: copy_one_pte cleanup · 209b450c
      Andrew Morton authored
      From: Hugh Dickins <hugh@veritas.com>
      
      Clean up mremap move's copy_one_pte:
      
      - get_one_pte_map_nested already weeded out the pte_none case,
        now don't even call copy_one_pte if it has nothing to do.
      
      - check pfn_valid before passing page to page_remove_rmap.
      209b450c
    • Andrew Morton's avatar
      [PATCH] fork vma ordering during fork · 424e44d1
      Andrew Morton authored
      From: Hugh Dickins <hugh@veritas.com>
      
      First of six patches against 2.6.5-rc3, cleaning up mremap's move_vma, and
      fixing truncation orphan issues raised by Rajesh Venkatasubramanian. 
      Originally done as part of the anonymous objrmap work on mremap move, but
      useful fixes now extracted for mainline.  The mremap changes need some
      exposure in the -mm tree first, but the first (fork one-liner) is safe enough
      to go straight into 2.6.5.
      
      
      
      From: Rajesh Venkatasubramanian.  Despite the comment that child vma should
      be inserted just after parent vma, 2.5.6 did exactly the reverse: thus a
      racing vmtruncate may free the child's ptes, then advance to the parent, and
      meanwhile copy_page_range has propagated more ptes from the parent to the
      child, leaving file pages still mapped after truncation.
      424e44d1
    • Andrew Morton's avatar
      [PATCH] use compound pages for hugetlb pages only · 3c7011b3
      Andrew Morton authored
      The compound page logic is a little fragile - it relies on additional
      metadata in the pageframes which some other kernel code likes to stomp on
      (xfs was doing this).
      
      Also, because we're treating all higher-order pages as compound pages it is
      no longer possible to free individual lower-order pages from the middle of
      higher-order pages.  At least one ARM driver insists on doing this.
      
      We only really need the compound page logic for higher-order pages which can
      be mapped into user pagetables and placed under direct-io.  This covers
      hugetlb pages and, conceivably, soundcard DMA buffers which were allcoated
      with a higher-order allocation but which weren't marked PageReserved.
      
      The patch arranges for the hugetlb implications to allocate their pages with
      compound page metadata, and all other higher-order allocations go back to the
      old way.
      
      (Andrea supplied the GFP_LEVEL_MASK fix)
      3c7011b3