01 Oct, 2006

40 commits

  • This patch vectorizes aio_read() and aio_write() methods to prepare for
    collapsing all aio & vectored operations into one interface - which is
    aio_read()/aio_write().

    Signed-off-by: Badari Pulavarty
    Signed-off-by: Christoph Hellwig
    Cc: Michael Holzheu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     
  • When a file system becomes fragmented (using MythTV, for example), the
    bigalloc window searching ends up causing huge performance problems. In a
    file system presented by a user experiencing this bug, the file system was
    90% free, but no 32-block free windows existed on the entire file system.
    This causes the allocator to scan the entire file system for each 128k
    write before backing down to searching for individual blocks.

    In the end, finding a contiguous window for all the blocks in a write is an
    advantageous special case, but one that can be found naturally when such a
    window exists anyway.

    This patch removes the bigalloc window searching, and has been proven to
    fix the test case described above.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • The other common disk-based file systems (I checked ext[23], xfs, jfs)
    check to ensure that opens of files > 2 GB fail unless O_LARGEFILE is
    specified. They check via generic_file_open or their own open routine.

    ReiserFS doesn't have an f_op->open defined, and as such, it's possible to
    open files > 2 GB without O_LARGEFILE.

    This patch adds the f_op->open member to conform with the expected
    behavior.

    Signed-off-by: Jeff Mahoney
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This is the patch the three previous ones have been leading up to.

    It changes the behavior of ReiserFS from loading and caching all the bitmaps
    as special, to treating the bitmaps like any other bit of metadata and just
    letting the system-wide caches figure out what to hang on to.

    Buffer heads are allocated on the fly, so there is no need to retain pointers
    to all of them. The caching of the metadata occurs when the data is read and
    updated, and is considered invalid and uncached until then.

    I needed to remove the vs-4040 check for performing a duplicate operation on a
    particular bit. The reason is that while the other sites for working with
    bitmaps are allowed to schedule, is_reusable() is called from do_balance(),
    which will panic if a schedule occurs in certain places.

    The benefit of on-demand bitmaps clearly outweighs a sanity check that depends
    on a compile-time option that is discouraged.

    [akpm@osdl.org: warning fix]
    Signed-off-by: Jeff Mahoney
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch moves the bitmap loading code from super.c to bitmap.c

    The code is also restructured somewhat. The only difference between new
    format bitmaps and old format bitmaps is where they are. That's a two liner
    before loading the block to use the correct one. There's no need for an
    entirely separate code path.

    The load path is generally the same, with the pattern being to throw out a
    bunch of requests and then wait for them, then cache the metadata from the
    contents.

    Again, like the previous patches, the purpose is to set up for later ones.

    Update: There was a bug in the previously posted version of this that resulted
    in corruption. The problem was that bitmap 0 on new format file systems must
    be treated specially, and wasn't. A stupid bug with an easy fix.

    This is hopefully the last fix for the disaster that is the reiserfs bitmap
    patch set.

    If a bitmap block was full, first_zero_hint would end up at zero since it
    would never be changed from it's zeroed out value. This just sets it
    beyond the end of the bitmap block. If any bits are freed, it will be
    reset to a valid bit. When info->free_count = 0, then we already know it's
    full.

    Signed-off-by: Jeff Mahoney
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • Similar to the SB_JOURNAL cleanup that was accepted a while ago, this patch
    uses a temporary variable for buffer head references from the bitmap info
    array.

    This makes the code much more readable in some areas.

    It also uses proper reference counting, doing a get_bh() after using the
    pointer from the array and brelse()'ing it later. This may seem silly, but a
    later patch will replace the simple temporary variables with an actual read,
    so the reference freeing will be used then.

    Signed-off-by: Jeff Mahoney
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • There is a check in is_reusable to determine if a particular block is a bitmap
    block. It verifies this by going through the array of bitmap block buffer
    heads and comparing the block number to each one.

    Bitmap blocks are at defined locations on the disk in both old and current
    formats. Simply checking against the known good values is enough.

    This is a trivial optimization for a non-production codepath, but this is the
    first in a series of patches that will ultimately remove the buffer heads from
    that array.

    Signed-off-by: Jeff Mahoney
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • With 2.6.18-rc4-mm2, now wall_jiffies will always be the same as jiffies.
    So we can kill wall_jiffies completely.

    This is just a cleanup and logically should not change any real behavior
    except for one thing: RTC updating code in (old) ppc and xtensa use a
    condition "jiffies - wall_jiffies == 1". This condition is never met so I
    suppose it is just a bug. I just remove that condition only instead of
    kill the whole "if" block.

    [heiko.carstens@de.ibm.com: s390 build fix and cleanup]
    Signed-off-by: Atsushi Nemoto
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • This patch contains the following possible cleanups:
    - make the following needlessly global function static:
    - ntp_update_frequency()
    - make the following needlessly global variables static:
    - time_state
    - time_offset
    - time_constant
    - time_reftime
    - remove the following read-only global variable:
    - time_precision

    Signed-off-by: Adrian Bunk
    Cc: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Remove a few unused defines and remove obsolete information from comments.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This converts the kernel ntp model into a model which matches the nanokernel
    reference implementations. The previous patches already increased the
    resolution and precision of the computations, so that this conversion becomes
    quite simple.

    explains:

    The original NTP kernel interface was defined in units of microseconds.
    That's what Linux implements. As computers have gotten faster and can now
    split microseconds easily, a new kernel interface using nanosecond units was
    defined ("the nanokernel", confusing as that name is to OS hackers), and
    there's an STA_NANO bit in the adjtimex() status field to tell the application
    which units it's using.

    The current ntpd supports both, but Linux loses some possible timing
    resolution because of quantization effects, and the ntpd hackers would really
    like to be able to drop the backwards compatibility code.

    Ulrich Windl has been maintaining a patch set to do the conversion for years,
    but it's hard to keep in sync.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This converts time_freq to a scaled nsec value and adds around 6bit of extra
    resolution. This pushes the time_freq to its 32bit limits so the calculatons
    have to be done with 64bit.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • time_tolerance isn't changed at all in the kernel, so simply remove it, this
    simplifies the next patch, as it avoids a number of conversions.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This folds update_ntp_one_tick() into second_overflow() and adds time_adjust
    to the tick length, this makes time_next_adjust unnecessary. This slightly
    changes the adjtime() behaviour, instead of applying it to the next tick, it's
    applied to the next second.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This converts time_offset into a scaled per tick value. This avoids now
    completely the crude compensation in second_overflow().

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This adds the frequency part to ntp_update_frequency().

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This makes time_adj local to second_overflow() and integrates it into the tick
    length instead of adding it everytime.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • This introduces ntp_update_frequency() and deinlines ntp_clear() (as it's not
    performance critical). ntp_update_frequency() calculates the base tick length
    using tick_usec and adds a base adjustment, in case the frequency doesn't
    divide evenly by HZ.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Move all the NTP related code to ntp.c

    [akpm@osdl.org: cleanups, build fix]
    Signed-off-by: John Stultz
    Cc: Ingo Molnar
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     
  • The lock annotation macros __acquires, __releases, __acquire, and __release
    all currently throw away the lock expression passed as an argument. Now
    that sparse can parse __context__ and __attribute__((context)) with a
    context expression, pass the lock expression down to sparse as the context
    expression. This requires a version of sparse from GIT commit
    37475a6c1c3e66219e68d912d5eb833f4098fd72 or later.

    Signed-off-by: Josh Triplett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • If the driver has interrupts available to it, there is really no reason to
    have a kernel daemon push the IPMI state machine.

    Note that I have experienced machines where the interrupts do not work
    correctly. This was a long time ago and hopefully things are better now.
    If some machines still have broken interrupts, a blacklist will need to be
    added.

    Signed-off-by: Corey Minyard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Corey Minyard
     
  • This syncs the omap_cf driver with the one from the linux-omap tree. Changes
    include fixing build warnings (section mismatch, unused return value) and
    coping with various pcmcia core changes related to managing i/o memory and irq
    resources.

    Signed-off-by: David Brownell
    Cc: Dominik Brodowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Check return value of sysfs_create_bin_file(). Fix polarity of
    RTC_BATT_FLAG bit in DS1742.

    Signed-off-by: Atsushi Nemoto
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • This lets the at91rm9200 RTC alarm be a system wakeup irq, according to the
    setting of /sys/devices/platform/at91_rtc/power/wakeup. User code can set the
    alarm, put the system into a low power mode, and then rely on it waking up no
    later than the specified moment.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Update RTC framework so that drivers can constify their method tables, moving
    them from ".data" to ".rodata". Then update the drivers.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • The rtc_is_valid_tm() routine needs to treat some of the fields it checks as
    unsigned, to prevent wrongly accepting invalid rtc_time structs; this is the
    same approach used elsewhere in the RTC code for such tests.

    Conversely, rtc_proc_show() is missing one invalid-day-of-month test that
    rtc_is_valid_tm() makes: there is no day zero.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • This makes RTC core components use "subsys_init" instead of "module_init", as
    appropriate for subsystem infrastructure. This is mostly useful for
    statically linking drivers in other parts of the tree that may provide an RTC
    interface as a secondary functionality (e.g. part of a multifunction chip);
    they won't need to worry so much about drivers/Makefile link order.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Acked-by: Oleg Verych
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Small updates to make the RTC class Kconfig text be more informative. This
    should help folk used to the drivers/char/rtc.c support, or a single RTC, be
    slightly less surprised by the differences.

    Also, adds a new RTC_DEBUG option to predefine DEBUG in the framework and its
    drivers, while debugging. That's getting to be a standard idiom, and it's
    pretty useful.

    Signed-off-by: David Brownell
    Cc: Alessandro Zummo
    Acked-by: Oleg Verych
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • SYSCTL should still depend on EMBEDDED. This unbreaks the EMBEDDED menu
    (from the recent SYSCTL_SYCALL menu option patch).

    Fix typos in new SYSCTL_SYSCALL menu.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • The century bit PCF8563_MO_C in the month register is misinterpreted. It
    is set to 1 for the 20th century and 0 for 21th, and the driver is
    expecting the opposite behavior.

    Acked-by: Alessandro Zummo
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean-Baptiste Maneyrol
     
  • The driver is allocating a page but doesn't actually use it for anything.

    (History from the old ->write method before Linus cleaned it up)

    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • All on stack DECLARE_COMPLETIONs should be replaced by:
    DECLARE_COMPLETION_ONSTACK

    Signed-off-by: Peter Zijlstra
    Acked-by: Ingo Molnar
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Looks like the probe function always gets a valid pdev, and checking it
    after dereferencing it is pretty useless. This patch removes the check
    (cid #1365)

    Signed-off-by: Eric Sesterhenn
    Cc: Alessandro Zummo
    Cc: Raphael Assenat
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sesterhenn
     
  • BUG_ON() does this unlikely check itself, as bugs in Linux are unlikely
    anyway :)

    Signed-off-by: Rolf Eike Beer
    Acked-by: Zach Brown
    Acked-by: Benjamin LaHaise
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rolf Eike Beer
     
  • Address some simple typos in rt-mutex-design.txt It also changes the
    indentation of the cmpxchg example (the cmpxchg example was indented by
    spaces, while all other code snippets were indented by tabs).

    Acked-by: Steven Rostedt
    Signed-off-by: Jan Altenberg
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Altenberg
     
  • Support hdaps on Lenovo ThinkPad T60. It was tested with pivot utility
    from http://www.kernel.org/pub/linux/kernel/people/rml/hdaps and it seems
    to be OK.

    Cc: Jean Delvare
    Cc: Greg Kroah-Hartman
    Cc: Robert Love
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Soos Peter
     
  • This fixes two off by ones in the mwave driver, found
    via find -iname \*.[ch] | xargs grep "> ARRAY_SIZE("

    Signed-off-by: Eric Sesterhenn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sesterhenn
     
  • Switch trident to use pci_get/put_dev properly. Also fix a bug where the
    driver erroneously passed pdev not NULL to a second search. This happened
    to always work except with pci=reverse because of chip ordering.

    Signed-off-by: Alan Cox
    Signed-off-by: Muli Ben-Yehuda
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • SysRq : Emergency Sync
    Emergency Sync complete
    SysRq : Emergency Remount R/O
    Emergency Remount complete
    SysRq : Resetting
    BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)

    Call Trace:
    [] show_trace+0xae/0x319
    [] dump_stack+0x15/0x17
    [] trace_hardirqs_on+0xbc/0x13d
    [] sysrq_handle_reboot+0x9/0x11
    [] __handle_sysrq+0x99/0x130
    [] handle_sysrq+0x17/0x19
    [] kbd_event+0x32e/0x57d
    [] input_event+0x42d/0x45b
    [] atkbd_interrupt+0x44d/0x53d
    [] serio_interrupt+0x49/0x86
    [] i8042_interrupt+0x202/0x21a
    [] handle_IRQ_event+0x2c/0x64
    [] __do_IRQ+0xaf/0x114
    [] do_IRQ+0xf8/0x107
    [] ret_from_intr+0x0/0xf
    DWARF2 unwinder stuck at ret_from_intr+0x0/0xf
    Leftover inexact backtrace:
    [] mwait_idle+0x3f/0x54
    [] cpu_idle+0xa2/0xc5
    [] rest_init+0x2b/0x2d
    [] start_kernel+0x24a/0x24c
    [] _sinittext+0x28b/0x292

    Since we're shutting down anyway, don't bother being smart,
    just turn the thing off.

    Signed-off-by: Peter Zijlstra
    Acked-by: Ingo Molnar
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Signed-off-by: Alan Cox
    Cc: Dominik Brodowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox