20 Feb, 2007

4 commits

  • The BUG_ON() in tick_nohz_stop_sched_tick() triggers on some boxen.
    Remove the BUG_ON and print information about the pending softirq
    to allow better debugging of the problem.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • When a CPU is needed for RCU the tick has to continue even when it was
    stopped before.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • * 'audit.b37' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
    [PATCH] AUDIT_FD_PAIR
    [PATCH] audit config lockdown
    [PATCH] minor update to rule add/delete messages (ver 2)

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (25 commits)
    Documentation/kernel-docs.txt update.
    arch/cris: typo in KERN_INFO
    Storage class should be before const qualifier
    kernel/printk.c: comment fix
    update I/O sched Kconfig help texts - CFQ is now default, not AS.
    Remove duplicate listing of Cris arch from README
    kbuild: more doc. cleanups
    doc: make doc. for maxcpus= more visible
    drivers/net/eexpress.c: remove duplicate comment
    add a help text for BLK_DEV_GENERIC
    correct a dead URL in the IP_MULTICAST help text
    fix the BAYCOM_SER_HDX help text
    fix SCSI_SCAN_ASYNC help text
    trivial documentation patch for platform.txt
    Fix typos concerning hierarchy
    Fix comment typo "spin_lock_irqrestore".
    Fix misspellings of "agressive".
    drivers/scsi/a100u2w.c: trivial typo patch
    Correct trivial typo in log2.h.
    Remove useless FIND_FIRST_BIT() macro from cardbus.c.
    ...

    Linus Torvalds
     

18 Feb, 2007

4 commits

  • Provide an audit record of the descriptor pair returned by pipe() and
    socketpair(). Rewritten from the original posted to linux-audit by
    John D. Ramsdell

    Signed-off-by: Al Viro

    Al Viro
     
  • The following patch adds a new mode to the audit system. It uses the
    audit_enabled config option to introduce the idea of audit enabled, but
    configuration is immutable. Any attempt to change the configuration
    while in this mode is audited. To change the audit rules, you'd need to
    reboot the machine.

    To use this option, you'd need a modified version of auditctl and use "-e 2".
    This is intended to go at the end of the audit.rules file for people that
    want an immutable configuration.

    This patch also adds "res=" to a number of configuration commands that did not
    have it before.

    Signed-off-by: Steve Grubb
    Signed-off-by: Al Viro

    Steve Grubb
     
  • I was looking at parsing some of these messages and found that I wanted what
    it was doing next to an op= for the parser to key on. Also missing was the list
    number and results.

    Signed-off-by: Steve Grubb
    Signed-off-by: Al Viro

    Steve Grubb
     
  • Signed-off-by: Patrick Pletscher
    Signed-off-by: Adrian Bunk

    Patrick Pletscher
     

17 Feb, 2007

32 commits

  • Fix source files to build with CONFIG_SYSFS=n.
    module_subsys is not available.

    SYSFS=n, MODULES=y: T:y
    SYSFS=n, MODULES=n: T:y

    SYSFS=y, MODULES=y: T:y
    SYSFS=y, MODULES=n: T:y

    Signed-off-by: Randy Dunlap
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     
  • Here is a patch that removes all redundant kobject_unregister argument checks.

    Signed-off-by: Mariusz Kozlowski
    Signed-off-by: Greg Kroah-Hartman

    Mariusz Kozlowski
     
  • On recent systems, calls to /sbin/modprobe are handled by udev depending
    on the kind of device the kernel has discovered. This patch creates an
    uevent for the kernels internal request_module(), to let udev take control
    over the request, instead of forking the binary directly by the kernel.
    The direct execution of /sbin/modprobe can be disabled by setting:
    /sys/module/kmod/mod_request_helper (/proc/sys/kernel/modprobe)
    to an empty string, the same way /proc/sys/kernel/hotplug is disabled on an
    udev system.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Use mask_ack_irq() where possible.

    Signed-off-by: Jan Beulich
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • Fix kernel-doc warnings in IRQ management.

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

    Randy Dunlap
     
  • Never mask interrupts immediately upon request. Disabling interrupts in
    high-performance codepaths is rare, and on the other hand this change could
    recover lost edges (or even other types of lost interrupts) by conservatively
    only masking interrupts after they happen. (NOTE: with this change the
    highlevel irq-disable code still soft-disables this IRQ line - and if such an
    interrupt happens then the IRQ flow handler keeps the IRQ masked.)

    Mark i8529A controllers as 'never loses an edge'.

    Signed-off-by: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Use RCU to avoid the need to acquire tasklist_lock in the single-threaded
    case of clock_gettime(). It still acquires tasklist_lock when for a
    (potentially multithreaded) process. This change allows realtime
    applications to frequently monitor CPU consumption of individual tasks, as
    requested (and now deployed) by some off-list users.

    This has been in Ingo Molnar's -rt patchset since late 2005 with no
    problems reported, and tests successfully on 2.6.20-rc6, so I believe that
    it is long-since ready for mainline adoption.

    [paulmck@linux.vnet.ibm.com: fix exit()/posix_cpu_clock_get() race spotted by Oleg]
    Signed-off-by: Paul E. McKenney
    Signed-off-by: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: john stultz
    Cc: Roman Zippel
    Cc: Oleg Nesterov
    Signed-off-by: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • In preparation for the x86_64 generic time conversion, this patch splits out
    TSC and HPET related code from arch/x86_64/kernel/time.c into respective
    hpet.c and tsc.c files.

    [akpm@osdl.org: fix printk timestamps]
    [akpm@osdl.org: cleanup]
    Signed-off-by: John Stultz
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     
  • Provides generic infrastructure for vsyscall-gtod.

    [akpm@osdl.org: cleanup]
    Signed-off-by: John Stultz
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: Roman Zippel

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

    john stultz
     
  • add /proc/timer_list, which prints all currently pending (high-res) timers,
    all clock-event sources and their parameters in a human-readable form.

    Sample output:

    Timer List Version: v0.1
    HRTIMER_MAX_CLOCK_BASES: 2
    now at 4246046273872 nsecs

    cpu: 0
    clock 0:
    .index: 0
    .resolution: 1 nsecs
    .get_time: ktime_get_real
    .offset: 1273998312645738432 nsecs
    active timers:
    clock 1:
    .index: 1
    .resolution: 1 nsecs
    .get_time: ktime_get
    .offset: 0 nsecs
    active timers:
    #0: , hrtimer_sched_tick, hrtimer_stop_sched_tick, swapper/0
    # expires at 4246432689566 nsecs [in 386415694 nsecs]
    #1: , hrtimer_wakeup, do_nanosleep, pcscd/2050
    # expires at 4247018194689 nsecs [in 971920817 nsecs]
    #2: , hrtimer_wakeup, do_nanosleep, irqbalance/1909
    # expires at 4247351358392 nsecs [in 1305084520 nsecs]
    #3: , hrtimer_wakeup, do_nanosleep, crond/2157
    # expires at 4249097614968 nsecs [in 3051341096 nsecs]
    #4: , it_real_fn, do_setitimer, syslogd/1888
    # expires at 4251329900926 nsecs [in 5283627054 nsecs]
    .expires_next : 4246432689566 nsecs
    .hres_active : 1
    .check_clocks : 0
    .nr_events : 31306
    .idle_tick : 4246020791890 nsecs
    .tick_stopped : 1
    .idle_jiffies : 986504
    .idle_calls : 40700
    .idle_sleeps : 36014
    .idle_entrytime : 4246019418883 nsecs
    .idle_sleeptime : 4178181972709 nsecs

    cpu: 1
    clock 0:
    .index: 0
    .resolution: 1 nsecs
    .get_time: ktime_get_real
    .offset: 1273998312645738432 nsecs
    active timers:
    clock 1:
    .index: 1
    .resolution: 1 nsecs
    .get_time: ktime_get
    .offset: 0 nsecs
    active timers:
    #0: , hrtimer_sched_tick, hrtimer_restart_sched_tick, swapper/0
    # expires at 4246050084568 nsecs [in 3810696 nsecs]
    #1: , hrtimer_wakeup, do_nanosleep, atd/2227
    # expires at 4261010635003 nsecs [in 14964361131 nsecs]
    #2: , hrtimer_wakeup, do_nanosleep, smartd/2332
    # expires at 5469485798970 nsecs [in 1223439525098 nsecs]
    .expires_next : 4246050084568 nsecs
    .hres_active : 1
    .check_clocks : 0
    .nr_events : 24043
    .idle_tick : 4246046084568 nsecs
    .tick_stopped : 0
    .idle_jiffies : 986510
    .idle_calls : 26360
    .idle_sleeps : 22551
    .idle_entrytime : 4246043874339 nsecs
    .idle_sleeptime : 4170763761184 nsecs

    tick_broadcast_mask: 00000003
    event_broadcast_mask: 00000001

    CPU#0's local event device:

    Clock Event Device: lapic
    capabilities: 0000000e
    max_delta_ns: 807385544
    min_delta_ns: 1443
    mult: 44624025
    shift: 32
    set_next_event: lapic_next_event
    set_mode: lapic_timer_setup
    event_handler: hrtimer_interrupt
    .installed: 1
    .expires: 4246432689566 nsecs

    CPU#1's local event device:

    Clock Event Device: lapic
    capabilities: 0000000e
    max_delta_ns: 807385544
    min_delta_ns: 1443
    mult: 44624025
    shift: 32
    set_next_event: lapic_next_event
    set_mode: lapic_timer_setup
    event_handler: hrtimer_interrupt
    .installed: 1
    .expires: 4246050084568 nsecs

    Clock Event Device: hpet
    capabilities: 00000007
    max_delta_ns: 2147483647
    min_delta_ns: 3352
    mult: 61496110
    shift: 32
    set_next_event: hpet_next_event
    set_mode: hpet_set_mode
    event_handler: handle_nextevt_broadcast

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Add /proc/timer_stats support: debugging feature to profile timer expiration.
    Both the starting site, process/PID and the expiration function is captured.
    This allows the quick identification of timer event sources in a system.

    Sample output:

    # echo 1 > /proc/timer_stats
    # cat /proc/timer_stats
    Timer Stats Version: v0.1
    Sample period: 4.010 s
    24, 0 swapper hrtimer_stop_sched_tick (hrtimer_sched_tick)
    11, 0 swapper sk_reset_timer (tcp_delack_timer)
    6, 0 swapper hrtimer_stop_sched_tick (hrtimer_sched_tick)
    2, 1 swapper queue_delayed_work_on (delayed_work_timer_fn)
    17, 0 swapper hrtimer_restart_sched_tick (hrtimer_sched_tick)
    2, 1 swapper queue_delayed_work_on (delayed_work_timer_fn)
    4, 2050 pcscd do_nanosleep (hrtimer_wakeup)
    5, 4179 sshd sk_reset_timer (tcp_write_timer)
    4, 2248 yum-updatesd schedule_timeout (process_timeout)
    18, 0 swapper hrtimer_restart_sched_tick (hrtimer_sched_tick)
    3, 0 swapper sk_reset_timer (tcp_delack_timer)
    1, 1 swapper neigh_table_init_no_netlink (neigh_periodic_timer)
    2, 1 swapper e1000_up (e1000_watchdog)
    1, 1 init schedule_timeout (process_timeout)
    100 total events, 25.24 events/sec

    [ cleanups and hrtimers support from Thomas Gleixner ]
    [bunk@stusta.de: nr_entries can become static]
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Cc: john stultz
    Cc: Roman Zippel
    Cc: Andi Kleen
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Fix potential setitimer DoS with high-res timers by pushing itimer rearm
    processing to process context.

    [Fixes from: Ingo Molnar ]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Implement high resolution timers on top of the hrtimers infrastructure and the
    clockevents / tick-management framework. This provides accurate timers for
    all hrtimer subsystem users.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • With Ingo Molnar

    Add functions to provide dynamic ticks and high resolution timers. The code
    which keeps track of jiffies and handles the long idle periods is shared
    between tick based and high resolution timer based dynticks. The dyntick
    functionality can be disabled on the kernel commandline. Provide also the
    infrastructure to support high resolution timers.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • With Ingo Molnar

    Add broadcast functionality, so per cpu clock event devices can be registered
    as dummy devices or switched from/to broadcast on demand. The broadcast
    function distributes the events via the broadcast function of the clock event
    device. This is primarily designed to replace the switch apic timer to / from
    IPI in power states, where the apic stops.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • With Ingo Molnar

    The tick-management code is the first user of the clockevents layer. It takes
    clock event devices from the clock events core and uses them to provide the
    periodic tick.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Architectures register their clock event devices, in the clock events core.
    Users of the clockevents core can get clock event devices for their use. The
    clockevents core code provides notification mechanisms for various clock
    related management events.

    This allows to control the clock event devices without the architectures
    having to worry about the details of function assignment. This is also a
    preliminary for high resolution timers and dynamic ticks to allow the core
    code to control the clock functionality without intrusive changes to the
    architecture code.

    [Fixes-by: Ingo Molnar ]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: Roman Zippel
    Cc: john stultz
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Reintroduce ktimers feature "optimized away" by the ktimers review process:
    remove the curr_timer pointer from the cpu-base and use the hrtimer state.

    No functional changes.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: Roman Zippel
    Cc: john stultz
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Reintroduce ktimers feature "optimized away" by the ktimers review process:
    multiple hrtimer states to enable the running of hrtimers without holding the
    cpu-base-lock.

    (The "optimized" rbtree hack carried only 2 states worth of information and we
    need 4 for high resolution timers and dynamic ticks.)

    No functional changes.

    Build-fixes-from: Andrew Morton
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: Roman Zippel
    Cc: john stultz
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Improve kernel/hrtimers.c locking: use a per-CPU base with a lock to control
    locking of all clocks belonging to a CPU. This simplifies code that needs to
    lock all clocks at once. This makes life easier for high-res timers and
    dyntick.

    No functional changes.

    [ optimization change from Andrew Morton ]

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • - hrtimers did not use the hrtimer_restart enum and relied on the implict
    int representation. Fix the prototypes and the functions using the enums.
    - Use seperate name spaces for the enumerations
    - Convert hrtimer_restart macro to inline function
    - Add comments

    No functional changes.

    [akpm@osdl.org: fix input driver]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • For CONFIG_NO_HZ we need to calculate the next timer wheel event based on a
    given jiffie value. Extend the existing code to allow the extra 'now'
    argument. Provide a compability function for the existing implementations to
    call the function with now == jiffies. (This also solves the racyness of the
    original code vs. jiffies changing during the iteration.)

    No functional changes to existing users of this infrastructure.

    [ remove WARN_ON() that triggered on s390, by Carsten Otte ]
    [ made new helper static, Adrian Bunk ]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • When searching for the next pending timer in the timer wheel we need to take
    the cascade into account. The current code has several problems:

    1. it looks into the previous cascade
    2. it ignores a pending cascade
    3. it ignores multiple cascades

    Change the cascade lookup, so it calculates the array index from the point of
    the next cascade and always look at the cascade buckets, when the cascade is
    pending, i.e. gets executed in the next timer softirq. When multiple
    cascades are pending, then lookup the next buckets too.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Uninline irq_enter(). [dynticks adds more stuff to it]

    No functional changes.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • The TSC needs to be verified against another clocksource. Instead of using
    hardwired assumptions of available hardware, provide a generic verification
    mechanism. The verification uses the best available clocksource and handles
    the usability for high resolution timers / dynticks of the clocksource which
    needs to be verified.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • The clocksource code allows direct updates of the rating of a given
    clocksource now. Change TSC unstable tracking to use this interface and
    remove the update callback.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Using a flag filed allows to encode more than one information into a variable.
    Preparatory patch for the generic clocksource verification.

    [mingo@elte.hu: convert vmitime.c to the new clocksource flag]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Enqueue clocksources in rating order to make selection of the clocksource
    easier. Also check the match with an user override at enqueue time.

    Preparatory patch for the generic clocksource verification.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Persistent clock support: do proper timekeeping across suspend/resume.

    [bunk@stusta.de: cleanup]
    Signed-off-by: John Stultz
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: Roman Zippel
    Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John Stultz
     
  • Fix multiple conversion bugs in msecs_to_jiffies().

    The main problem is that this condition:

    if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET))

    overflows if HZ is smaller than 1000!

    This change is user-visible: for HZ=250 SUS-compliant poll()-timeout
    value of -20 is mistakenly converted to 'immediate timeout'.

    (The new dyntick code also triggered this, that's how we noticed.)

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • There are loads of fat functions hidden in jiffies.h. Uninline them. No code
    changes.

    [jeremy@goop.org: export fix]
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Cc: john stultz
    Cc: Roman Zippel
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Distangle the NTP update from HZ. This is necessary for dynamic tick enabled
    kernels.

    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz