1. 29 Jul, 2009 5 commits
  2. 28 Jul, 2009 1 commit
  3. 24 Jul, 2009 1 commit
  4. 23 Jul, 2009 1 commit
  5. 22 Jul, 2009 3 commits
    • Anton Vorontsov's avatar
      of/mdio: Add support function for Ethernet fixed-link property · 24c30dbb
      Anton Vorontsov authored
      Fixed-link support is broken for the ucc_eth, gianfar, and fs_enet
      device drivers.  The "OF MDIO rework" patches removed most of the
      support. Instead of re-adding fixed-link stuff to the drivers, this
      patch adds a support function for parsing the fixed-link property
      and obtaining a dummy phy to match.
      Note: the dummy phy handling in arch/powerpc is a bit of a hack and
      needs to be reworked.  This function is being added now to solve the
      regression in the Ethernet drivers, but it should be considered a
      temporary measure until the fixed link handling can be reworked.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Peter Zijlstra's avatar
      perf_counter: PERF_SAMPLE_ID and inherited counters · 7f453c24
      Peter Zijlstra authored
      Anton noted that for inherited counters the counter-id as provided by
      PERF_SAMPLE_ID isn't mappable to the id found through PERF_RECORD_ID
      because each inherited counter gets its own id.
      His suggestion was to always return the parent counter id, since that
      is the primary counter id as exposed. However, these inherited
      counters have a unique identifier so that events like
      PERF_EVENT_PERIOD and PERF_EVENT_THROTTLE can be specific about which
      counter gets modified, which is important when trying to normalize the
      sample streams.
      This patch removes PERF_EVENT_PERIOD in favour of PERF_SAMPLE_PERIOD,
      which is more useful anyway, since changing periods became a lot more
      common than initially thought -- rendering PERF_EVENT_PERIOD the less
      useful solution (also, PERF_SAMPLE_PERIOD reports the more accurate
      value, since it reports the value used to trigger the overflow,
      whereas PERF_EVENT_PERIOD simply reports the requested period changed,
      which might only take effect on the next cycle).
      This still leaves us PERF_EVENT_THROTTLE to consider, but since that
      _should_ be a rare occurrence, and linking it to a primary id is the
      most useful bit to diagnose the problem, we introduce a
      PERF_SAMPLE_STREAM_ID, for those few cases where the full
      reconstruction is important.
      [Does change the ABI a little, but I see no other way out]
      Suggested-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1248095846.15751.8781.camel@twins>
    • Peter Zijlstra's avatar
      softirq: introduce tasklet_hrtimer infrastructure · 9ba5f005
      Peter Zijlstra authored
      commit ca109491 (hrtimer: removing all ur callback modes) moved all
      hrtimer callbacks into hard interrupt context when high resolution
      timers are active. That breaks code which relied on the assumption
      that the callback happens in softirq context.
      Provide a generic infrastructure which combines tasklets and hrtimers
      together to provide an in-softirq hrtimer experience.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: torvalds@linux-foundation.org
      Cc: kaber@trash.net
      Cc: David Miller <davem@davemloft.net>
      LKML-Reference: <1248265724.27058.1366.camel@twins>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
  6. 21 Jul, 2009 3 commits
    • Eric Paris's avatar
      inotify: use GFP_NOFS under potential memory pressure · f44aebcc
      Eric Paris authored
      inotify can have a watchs removed under filesystem reclaim.
      [ INFO: inconsistent lock state ]
      2.6.31-rc2 #16
      inconsistent {IN-RECLAIM_FS-W} -> {RECLAIM_FS-ON-W} usage.
      khubd/217 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (iprune_mutex){+.+.?.}, at: [<c10ba899>] invalidate_inodes+0x20/0xe3
      {IN-RECLAIM_FS-W} state was registered at:
        [<c10536ab>] __lock_acquire+0x2c9/0xac4
        [<c1053f45>] lock_acquire+0x9f/0xc2
        [<c1308872>] __mutex_lock_common+0x2d/0x323
        [<c1308c00>] mutex_lock_nested+0x2e/0x36
        [<c10ba6ff>] shrink_icache_memory+0x38/0x1b2
        [<c108bfb6>] shrink_slab+0xe2/0x13c
        [<c108c3e1>] kswapd+0x3d1/0x55d
        [<c10449b5>] kthread+0x66/0x6b
        [<c1003fdf>] kernel_thread_helper+0x7/0x10
        [<ffffffff>] 0xffffffff
      Two things are needed to fix this.  First we need a method to tell
      fsnotify_create_event() to use GFP_NOFS and second we need to stop using
      one global IN_IGNORED event and allocate them one at a time.  This solves
      current issues with multiple IN_IGNORED on a queue having tail drop
      problems and simplifies the allocations since we don't have to worry about
      two tasks opperating on the IGNORED event concurrently.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
    • Alan Jenkins's avatar
      rfkill: remove too-strict __must_check · e56f0975
      Alan Jenkins authored
      Some drivers don't need the return value of rfkill_set_hw_state(),
      so it should not be marked as __must_check.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Thomas Gleixner's avatar
      genirq: Delegate irq affinity setting to the irq thread · 591d2fb0
      Thomas Gleixner authored
      irq_set_thread_affinity() calls set_cpus_allowed_ptr() which might
      sleep, but irq_set_thread_affinity() is called with desc->lock held
      and can be called from hard interrupt context as well. The code has
      another bug as it does not hold a ref on the task struct as required
      by set_cpus_allowed_ptr().
      Just set the IRQTF_AFFINITY bit in action->thread_flags. The next time
      the thread runs it migrates itself. Solves all of the above problems
      Add kerneldoc to irq_set_thread_affinity() while at it.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
  7. 18 Jul, 2009 1 commit
    • Thomas Gleixner's avatar
      sched: fix nr_uninterruptible accounting of frozen tasks really · 6301cb95
      Thomas Gleixner authored
      commit e3c8ca83 (sched: do not count frozen tasks toward load) broke
      the nr_uninterruptible accounting on freeze/thaw. On freeze the task
      is excluded from accounting with a check for (task->flags &
      PF_FROZEN), but that flag is cleared before the task is thawed. So
      while we prevent that the task with state TASK_UNINTERRUPTIBLE
      is accounted to nr_uninterruptible on freeze we decrement
      nr_uninterruptible on thaw.
      Use a separate flag which is handled by the freezing task itself. Set
      it before calling the scheduler with TASK_UNINTERRUPTIBLE state and
      clear it after we return from frozen state.
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
  8. 17 Jul, 2009 2 commits
  9. 16 Jul, 2009 1 commit
  10. 15 Jul, 2009 1 commit
    • Jan Kara's avatar
      ext3: Get rid of extenddisksize parameter of ext3_get_blocks_handle() · 43237b54
      Jan Kara authored
      Get rid of extenddisksize parameter of ext3_get_blocks_handle(). This seems to
      be a relict from some old days and setting disksize in this function does not
      make much sence. Currently it was set only by ext3_getblk().  Since the
      parameter has some effect only if create == 1, it is easy to check that the
      three callers which end up calling ext3_getblk() with create == 1 (ext3_append,
      ext3_quota_write, ext3_mkdir) do the right thing and set disksize themselves.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
  11. 14 Jul, 2009 2 commits
  12. 12 Jul, 2009 5 commits
  13. 11 Jul, 2009 1 commit
  14. 10 Jul, 2009 7 commits
    • Alan Cox's avatar
      tty: Fix USB kref leak · 24a15a62
      Alan Cox authored
      The sysrq code acquired a kref leak. Fix it by passing the tty separately
      from the caller (thus effectively using the callers kref which all the
      callers hold anyway)
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Peter Zijlstra's avatar
      sched: optimize cond_resched() · d86ee480
      Peter Zijlstra authored
      Optimize cond_resched() by removing one conditional.
      Currently cond_resched() checks system_state ==
      SYSTEM_RUNNING in order to avoid scheduling before the
      scheduler is running.
      We can however, as per suggestion of Matt, use
      PREEMPT_ACTIVE to accomplish that very same.
      Suggested-by: default avatarMatt Mackall <mpm@selenic.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarMatt Mackall <mpm@selenic.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Peter Zijlstra's avatar
      sched: INIT_PREEMPT_COUNT · c99e6efe
      Peter Zijlstra authored
      Pull the initial preempt_count value into a single
      definition site.
      Maintainers for: alpha, ia64 and m68k, please have a look,
      your arch code is funny.
      The header magic is a bit odd, but similar to the KERNEL_DS
      one, CPP waits with expanding these macros until the
      INIT_THREAD_INFO macro itself is expanded, which is in
      arch/*/kernel/init_task.c where we've already included
      sched.h so we're good.
      Cc: tony.luck@intel.com
      Cc: rth@twiddle.net
      Cc: geert@linux-m68k.org
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarMatt Mackall <mpm@selenic.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • FUJITA Tomonori's avatar
      block: fix sg SG_DXFER_TO_FROM_DEV regression · ecb554a8
      FUJITA Tomonori authored
      I overlooked SG_DXFER_TO_FROM_DEV support when I converted sg to use
      the block layer mapping API (2.6.28).
      Douglas Gilbert explained SG_DXFER_TO_FROM_DEV:
      The semantics of SG_DXFER_TO_FROM_DEV were:
         - copy user space buffer to kernel (LLD) buffer
         - do SCSI command which is assumed to be of the DATA_IN
           (data from device) variety. This would overwrite
           some or all of the kernel buffer
         - copy kernel (LLD) buffer back to the user space.
      The idea was to detect short reads by filling the original
      user space buffer with some marker bytes ("0xec" it would
      seem in this report). The "resid" value is a better way
      of detecting short reads but that was only added this century
      and requires co-operation from the LLD.
      This patch changes the block layer mapping API to support this
      semantics. This simply adds another field to struct rq_map_data and
      enables __bio_copy_iov() to copy data from user space even with READ
      It's better to add the flags field and kills null_mapped and the new
      from_user fields in struct rq_map_data but that approach makes it
      difficult to send this patch to stable trees because st and osst
      drivers use struct rq_map_data (they were converted to use the block
      layer in 2.6.29 and 2.6.30). Well, I should clean up the block layer
      mapping API.
      zhou sf reported this regiression and tested this patch:
      http://www.spinics.net/lists/linux-scsi/msg37168.htmlReported-by: default avatarzhou sf <sxzzsf@gmail.com>
      Tested-by: default avatarzhou sf <sxzzsf@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
    • Jens Axboe's avatar
      Fix congestion_wait() sync/async vs read/write confusion · 8aa7e847
      Jens Axboe authored
      Commit 1faa16d2 accidentally broke
      the bdi congestion wait queue logic, causing us to wait on congestion
      for WRITE (== 1) when we really wanted BLK_RW_ASYNC (== 0) instead.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
    • Heiko Carstens's avatar
      timer stats: fix quick check optimization · f9f868db
      Heiko Carstens authored
      git commit 507e1231 "timer stats: Optimize by adding quick check to
      avoid function calls" added one wrong check so that one unnecessary
      function call isn't elimated.
      time_stats_account_hrtimer() checks if timer->start_pid isn't
      initialized in order to find out if timer_stats_update_stats() should
      be called.  However start_pid is initialized with -1 instead of 0, so
      that the function call always happens.
      Check timer->start_site like in timer_stats_account_timer() to fix
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    • Thomas Gleixner's avatar
      hrtimer: Fix migration expiry check · 6ff7041d
      Thomas Gleixner authored
      The timer migration expiry check should prevent the migration of a
      timer to another CPU when the timer expires before the next event is
      scheduled on the other CPU. Migrating the timer might delay it because
      we can not reprogram the clock event device on the other CPU. But the
      code implementing that check has two flaws:
      - for !HIGHRES the check compares the expiry value with the clock
        events device expiry value which is wrong for CLOCK_REALTIME based
      - the check is racy. It holds the hrtimer base lock of the target CPU,
        but the clock event device expiry value can be modified
        nevertheless, e.g. by an timer interrupt firing.
      The !HIGHRES case is easy to fix as we can enqueue the timer on the
      cpu which was selected by the load balancer. It runs the idle
      balancing code once per jiffy anyway. So the maximum delay for the
      timer is the same as when we keep the tick on the current cpu going.
      In the HIGHRES case we can get the next expiry value from the hrtimer
      cpu_base of the target CPU and serialize the update with the cpu_base
      lock. This moves the lock section in hrtimer_interrupt() so we can set
      next_event to KTIME_MAX while we are handling the expired timers and
      set it to the next expiry value after we handled the timers under the
      base lock. While the expired timers are processed timer migration is
      blocked because the expiry time of the timer is always <= KTIME_MAX.
      Also remove the now useless clockevents_get_next_event() function.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
  15. 09 Jul, 2009 1 commit
  16. 08 Jul, 2009 5 commits