Skip to content
  1. Nov 14, 2009
  2. Nov 05, 2009
    • Martin Schwidefsky's avatar
      nohz: Introduce arch_needs_cpu · 3c5d92a0
      Martin Schwidefsky authored
      
      
      Allow the architecture to request a normal jiffy tick when the system
      goes idle and tick_nohz_stop_sched_tick is called . On s390 the hook is
      used to prevent the system going fully idle if there has been an
      interrupt other than a clock comparator interrupt since the last wakeup.
      
      On s390 the HiperSockets response time for 1 connection ping-pong goes
      down from 42 to 34 microseconds. The CPU cost decreases by 27%.
      
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      LKML-Reference: <20090929122533.402715150@de.ibm.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      3c5d92a0
    • Martin Schwidefsky's avatar
      nohz: Reuse ktime in sub-functions of tick_check_idle. · eed3b9cf
      Martin Schwidefsky authored
      
      
      On a system with NOHZ=y tick_check_idle calls tick_nohz_stop_idle and
      tick_nohz_update_jiffies. Given the right conditions (ts->idle_active
      and/or ts->tick_stopped) both function get a time stamp with ktime_get.
      The same time stamp can be reused if both function require one.
      
      On s390 this change has the additional benefit that gcc inlines the
      tick_nohz_stop_idle function into tick_check_idle. The number of
      instructions to execute tick_check_idle drops from 225 to 144
      (without the ktime_get optimization it is 367 vs 215 instructions).
      
      before:
      
       0)               |  tick_check_idle() {
       0)               |    tick_nohz_stop_idle() {
       0)               |      ktime_get() {
       0)               |        read_tod_clock() {
       0)   0.601 us    |        }
       0)   1.765 us    |      }
       0)   3.047 us    |    }
       0)               |    ktime_get() {
       0)               |      read_tod_clock() {
       0)   0.570 us    |      }
       0)   1.727 us    |    }
       0)               |    tick_do_update_jiffies64() {
       0)   0.609 us    |    }
       0)   8.055 us    |  }
      
      after:
      
       0)               |  tick_check_idle() {
       0)               |    ktime_get() {
       0)               |      read_tod_clock() {
       0)   0.617 us    |      }
       0)   1.773 us    |    }
       0)               |    tick_do_update_jiffies64() {
       0)   0.593 us    |    }
       0)   4.477 us    |  }
      
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: john stultz <johnstul@us.ibm.com>
      LKML-Reference: <20090929122533.206589318@de.ibm.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      eed3b9cf
  3. Oct 05, 2009
    • John Stultz's avatar
      time: Remove xtime_cache · 7bc7d637
      John Stultz authored
      
      
      With the prior logarithmic time accumulation patch, xtime will now
      always be within one "tick" of the current time, instead of
      possibly half a second off.
      
      This removes the need for the xtime_cache value, which always
      stored the time at the last interrupt, so this patch cleans that up
      removing the xtime_cache related code.
      
      This is a bit simpler, but still could use some wider testing.
      
      Signed-off-by: default avatarJohn Stultz <johnstul@us.ibm.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarJohn Kacur <jkacur@redhat.com>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      LKML-Reference: <1254525855.7741.95.camel@localhost.localdomain>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      7bc7d637
    • John Stultz's avatar
      time: Implement logarithmic time accumulation · a092ff0f
      John Stultz authored
      
      
      Accumulating one tick at a time works well unless we're using NOHZ.
      Then it can be an issue, since we may have to run through the loop
      a few thousand times, which can increase timer interrupt caused
      latency.
      
      The current solution was to accumulate in half-second intervals
      with NOHZ. This kept the number of loops down, however it did
      slightly change how we make NTP adjustments. While not an issue
      with NTPd users, as NTPd makes adjustments over a longer period of
      time, other adjtimex() users have noticed the half-second
      granularity with which we can apply frequency changes to the clock.
      
      For instance, if a application tries to apply a 100ppm frequency
      correction for 20ms to correct a 2us offset, with NOHZ they either
      get no correction, or a 50us correction.
      
      Now, there will always be some granularity error for applying
      frequency corrections. However with users sensitive to this error
      have seen a 50-500x increase with NOHZ compared to running without
      NOHZ.
      
      So I figured I'd try another approach then just simply increasing
      the interval. My approach is to consume the time interval
      logarithmically. This reduces the number of times through the loop
      needed keeping latency down, while still preserving the original
      granularity error for adjtimex() changes.
      
      Further, this change allows us to remove the xtime_cache code
      (patch to follow), as xtime is always within one tick of the
      current time, instead of the half-second updates it saw before.
      
      An earlier version of this patch has been shipping to x86 users in
      the RedHat MRG releases for awhile without issue, but I've reworked
      this version to be even more careful about avoiding possible
      overflows if the shift value gets too large.
      
      Signed-off-by: default avatarJohn Stultz <johnstul@us.ibm.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarJohn Kacur <jkacur@redhat.com>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      LKML-Reference: <1254525473.7741.88.camel@localhost.localdomain>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a092ff0f
  4. Oct 04, 2009
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev · 8a0382f6
      Linus Torvalds authored
      * 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
        m32r: Fix IPI function calls for SMP
        m32r: Fix set_memory() for DISCONTIGMEM
        m32r: add rtc_lock variable
        m32r: define ioread* and iowrite* macros
        m32r: export delay loop symbols
        m32r: fix tme_handler
      8a0382f6
    • Linus Torvalds's avatar
      tty: Avoid dropping ldisc_mutex over hangup tty re-initialization · 0b5759c6
      Linus Torvalds authored
      
      
      A couple of people have hit the WARN_ON() in drivers/char/tty_io.c,
      tty_open() that is unhappy about seeing the tty line discipline go away
      during the tty hangup. See for example
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=14255
      
      and the reason is that we do the tty_ldisc_halt() outside the
      ldisc_mutex in order to be able to flush the scheduled work without a
      deadlock with vhangup_work.
      
      However, it turns out that we can solve this particular case by
      
       - using "cancel_delayed_work_sync()" in tty_ldisc_halt(), which waits
         for just the particular work, rather than synchronizing with any
         random outstanding pending work.
      
         This won't deadlock, since the buf.work we synchronize with doesn't
         care about the ldisc_mutex, it just flushes the tty ldisc buffers.
      
       - realize that for this particular case, we don't need to wait for any
         hangup work, because we are inside the hangup codepaths ourselves.
      
      so as a result we can just drop the flush_scheduled_work() entirely, and
      then move the tty_ldisc_halt() call to inside the mutex.  That way we
      never expose the partially torn down ldisc state to tty_open(), and hold
      the ldisc_mutex over the whole sequence.
      
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Reported-by: default avatarHeinz Diehl <htd@fancy-poultry.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0b5759c6
    • Toshihiro HANAWA's avatar
      m32r: Fix IPI function calls for SMP · 0a3d31b7
      Toshihiro HANAWA authored
      This patch fixes the m32r SMP kernel after 2.6.27.
      
      A part of the following patch breaks m32r SMP operation.
      > m32r: convert to generic helpers for IPI function calls
      > commit 7b7426c8
      
      
      
      In the above patch, a CALL_FUNC_SINGLE_IPI was newly introduced,
      but the its IPI vector number was wrong in the patch code.
      
      The m32r SMP kernel hanged-up during boot operation, because
      the CPU_BOOT_IPI was called instead of CALL_FUNC_SINGLE_IPI
      (CPU_BOOT_IPI had no side effect at that time because the 2nd
      core had already been started up),
      as a result, csd_unlock() was not called, then a dead lock
      occurred in csd_lock_wait() after the detection of Compact Flash
      memory as IDE generic disk.
      
      Signed-off-by: default avatarToshihiro HANAWA <hanawa@ccs.tsukuba.ac.jp>
      Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
      0a3d31b7
    • Hirokazu Takata's avatar
      m32r: Fix set_memory() for DISCONTIGMEM · 6b6fabce
      Hirokazu Takata authored
      
      
      In case CONFIG_DISCONTIGMEM is set, the memory size of system was
      always determined by CONFIG_MEMORY_SIZE and was not changeable.
      
      This patch fixes set_memory() of arch/m32r/mm/discontig.c so that
      we can specify memory size by the "mem=<size>" kernel parameter.
      
      Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
      6b6fabce
    • Hirokazu Takata's avatar
      m32r: add rtc_lock variable · bac33bd5
      Hirokazu Takata authored
      
      
      Add a spinlock variable "rtc_lock".
      This is taken from arch/arm/kernel/time.c.
      
      Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
      bac33bd5
    • Hirokazu Takata's avatar
      m32r: define ioread* and iowrite* macros · d2c5821c
      Hirokazu Takata authored
      
      
      Define ioread* and iowrite* macros to fix the following build errors:
      
        CC [M]  drivers/uio/uio_smx.o
      drivers/uio/uio_smx.c: In function 'smx_handler':
      drivers/uio/uio_smx.c:31: error: implicit declaration of function 'ioread32'
      drivers/uio/uio_smx.c:37: error: implicit declaration of function 'iowrite32'
      
      Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
      d2c5821c
    • Hirokazu Takata's avatar
      m32r: export delay loop symbols · ced0f005
      Hirokazu Takata authored
      
      
      - Move EXPORT_SYMBOL lines of delay loop functions
        from arch/m32r/kernel/m32r_ksyms.c to arch/m32r/lib/delay.c.
      - Export __ndelay.
      
      Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
      ced0f005
    • Hirokazu Takata's avatar
      m32r: fix tme_handler · 2cff5e1a
      Hirokazu Takata authored
      
      
      Fix pmd_bad check code of tme_handler (TLB Miss Exception handler).
      The correct _KERNPG_TABLE value is not 0x263(=611) but 0x163.
      
      Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
      2cff5e1a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · f0a221ef
      Linus Torvalds authored
      * 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (21 commits)
        ALSA: usb - Use strlcat() correctly
        ALSA: Fix invalid __exit in sound/mips/*.c
        ALSA: hda - Fix / improve ALC66x parser
        ALSA: ctxfi: Swapped SURROUND-SIDE mute
        sound: Make keywest_driver static
        ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-B1VP
        ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs
        ASoC: fix kconfig order of Blackfin drivers
        ALSA: hda - Added quirk to enable sound on Toshiba NB200
        ASoC: Fix dependency of CONFIG_SND_PXA2XX_SOC_IMOTE2
        ALSA: Don't assume i2c device probing always succeeds
        ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-T350P
        ALSA: echoaudio - Re-enable the line-out control for the Mia card
        ALSA: hda - Resurrect input-source mixer of ALC268 model=acer
        ALSA: hda - Analog Devices AD1984A add HP Touchsmart model
        ALSA: hda - Add HP Pavilion dv4t-1300 to MSI whitelist
        ALSA: hda - CD-audio sound for hda-intel conexant benq laptop
        ASoC: DaVinci: Correct McASP FIFO initialization
        ASoC: Davinci: Fix race with cpu_dai->dma_data
        ASoC: DaVinci: Fix divide by zero error during 1st execution
        ...
      f0a221ef
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 9117703f
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        [PATCH] ext4: retry failed direct IO allocations
        ext4: Fix build warning in ext4_dirty_inode()
        ext4: drop ext4dev compat
        ext4: fix a BUG_ON crash by checking that page has buffers attached to it
      9117703f
    • Takashi Iwai's avatar
      Merge branch 'fix/hda' into for-linus · 7fa9742b
      Takashi Iwai authored
      7fa9742b
    • Takashi Iwai's avatar
      Merge branch 'fix/asoc' into for-linus · a1cb9cd6
      Takashi Iwai authored
      a1cb9cd6
  5. Oct 03, 2009
  6. Oct 02, 2009