1. 02 2月, 2012 1 次提交
  2. 01 2月, 2012 1 次提交
  3. 30 1月, 2012 1 次提交
    • R
      PM / Hibernate: Fix s2disk regression related to freezing workqueues · 181e9bde
      Rafael J. Wysocki 提交于
      Commit 2aede851
      
        PM / Hibernate: Freeze kernel threads after preallocating memory
      
      introduced a mechanism by which kernel threads were frozen after
      the preallocation of hibernate image memory to avoid problems with
      frozen kernel threads not responding to memory freeing requests.
      However, it overlooked the s2disk code path in which the
      SNAPSHOT_CREATE_IMAGE ioctl was run directly after SNAPSHOT_FREE,
      which caused freeze_workqueues_begin() to BUG(), because it saw
      that worqueues had been already frozen.
      
      Although in principle this issue might be addressed by removing
      the relevant BUG_ON() from freeze_workqueues_begin(), that would
      reintroduce the very problem that commit 2aede851
      attempted to avoid into that particular code path.  For this reason,
      to fix the issue at hand, introduce thaw_kernel_threads() and make
      the SNAPSHOT_FREE ioctl execute it.
      
      Special thanks to Srivatsa S. Bhat for detailed analysis of the
      problem.
      Reported-and-tested-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Cc: stable@kernel.org
      181e9bde
  4. 27 1月, 2012 1 次提交
    • S
      perf: Fix broken interrupt rate throttling · e050e3f0
      Stephane Eranian 提交于
      This patch fixes the sampling interrupt throttling mechanism.
      
      It was broken in v3.2. Events were not being unthrottled. The
      unthrottling mechanism required that events be checked at each
      timer tick.
      
      This patch solves this problem and also separates:
      
        - unthrottling
        - multiplexing
        - frequency-mode period adjustments
      
      Not all of them need to be executed at each timer tick.
      
      This third version of the patch is based on my original patch +
      PeterZ proposal (https://lkml.org/lkml/2012/1/7/87).
      
      At each timer tick, for each context:
      
        - if the current CPU has throttled events, we unthrottle events
      
        - if context has frequency-based events, we adjust sampling periods
      
        - if we have reached the jiffies interval, we multiplex (rotate)
      
      We decoupled rotation (multiplexing) from frequency-mode sampling
      period adjustments.  They should not necessarily happen at the same
      rate. Multiplexing is subject to jiffies_interval (currently at 1
      but could be higher once the tunable is exposed via sysfs).
      
      We have grouped frequency-mode adjustment and unthrottling into the
      same routine to minimize code duplication. When throttled while in
      frequency mode, we scan the events only once.
      
      We have fixed the threshold enforcement code in __perf_event_overflow().
      There was a bug whereby it would allow more than the authorized rate
      because an increment of hwc->interrupts was not executed at the right
      place.
      
      The patch was tested with low sampling limit (2000) and fixed periods,
      frequency mode, overcommitted PMU.
      
      On a 2.1GHz AMD CPU:
      
       $ cat /proc/sys/kernel/perf_event_max_sample_rate
       2000
      
      We set a rate of 3000 samples/sec (2.1GHz/3000 = 700000):
      
       $ perf record -e cycles,cycles -c 700000  noploop 10
       $ perf report -D | tail -21
      
       Aggregated stats:
                 TOTAL events:      80086
                  MMAP events:         88
                  COMM events:          2
                  EXIT events:          4
              THROTTLE events:      19996
            UNTHROTTLE events:      19996
                SAMPLE events:      40000
      
       cycles stats:
                 TOTAL events:      40006
                  MMAP events:          5
                  COMM events:          1
                  EXIT events:          4
              THROTTLE events:       9998
            UNTHROTTLE events:       9998
                SAMPLE events:      20000
      
       cycles stats:
                 TOTAL events:      39996
              THROTTLE events:       9998
            UNTHROTTLE events:       9998
                SAMPLE events:      20000
      
      For 10s, the cap is 2x2000x10 = 40000 samples.
      We get exactly that: 20000 samples/event.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Cc: <stable@kernel.org> # v3.2+
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20120126160319.GA5655@quadSigned-off-by: NIngo Molnar <mingo@elte.hu>
      e050e3f0
  5. 25 1月, 2012 3 次提交
    • J
      team: send only changed options/ports via netlink · b82b9183
      Jiri Pirko 提交于
      This patch changes event message behaviour to send only updated records
      instead of whole list. This fixes bug on which userspace receives non-actual
      data in case multiple events occur in row.
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b82b9183
    • R
      kernel-doc: fix new warning in usb.h · 0fcd9778
      Randy Dunlap 提交于
      Fix new kernel-doc warning:
      
      Warning(include/linux/usb.h:1251): No description found for parameter 'num_mapped_sgs'
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0fcd9778
    • R
      kernel-doc: fix new warnings in device.h · 1a5e29fc
      Randy Dunlap 提交于
      Fix new kernel-doc warnings:
      
      Warning(include/linux/device.h:299): No description found for parameter 'name'
      Warning(include/linux/device.h:299): No description found for parameter 'subsys'
      Warning(include/linux/device.h:299): No description found for parameter 'node'
      Warning(include/linux/device.h:299): No description found for parameter 'add_dev'
      Warning(include/linux/device.h:299): No description found for parameter 'remove_dev'
      Warning(include/linux/device.h:685): No description found for parameter 'id'
      Warning(include/linux/device.h:1009): No description found for parameter '__driver'
      Warning(include/linux/device.h:1009): No description found for parameter '__register'
      Warning(include/linux/device.h:1009): No description found for parameter '__unregister'
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1a5e29fc
  6. 24 1月, 2012 8 次提交
    • A
      usb: otg: kill langwell_otg driver · c1084a56
      Alexander Shishkin 提交于
      The way this driver was added by f0ae849d (usb: Add Intel Langwell USB
      OTG Transceiver Driver) never even compiled together with langwell_udc,
      and that's the only way for it to be useful.
      Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: stable@vger.kernel.org # v2.6.31+
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: linux-usb@vger.kernel.org
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c1084a56
    • S
      migrate_mode.h is not exported to user mode · c1aab02d
      Stephen Rothwell 提交于
      so move its include into fs.h inside the __KERNEL__ protection.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c1aab02d
    • R
      kernel-doc: fix kernel-doc warnings in sched · fa757281
      Randy Dunlap 提交于
      Fix new kernel-doc notation warnings:
      
      Warning(include/linux/sched.h:2094): No description found for parameter 'p'
      Warning(include/linux/sched.h:2094): Excess function parameter 'tsk' description in 'is_idle_task'
      Warning(kernel/sched/cpupri.c:139): No description found for parameter 'newpri'
      Warning(kernel/sched/cpupri.c:139): Excess function parameter 'pri' description in 'cpupri_set'
      Warning(kernel/sched/cpupri.c:208): Excess function parameter 'bootmem' description in 'cpupri_init'
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Cc:	Ingo Molnar <mingo@elte.hu>
      Cc:	Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fa757281
    • R
      kernel-doc: fix new warning in usb.h · 4d922612
      Randy Dunlap 提交于
      Fix new kernel-doc warning:
      
      Warning(include/linux/usb.h:1251): No description found for parameter 'num_mapped_sgs'
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4d922612
    • R
      kernel-doc: fix new warnings in device.h · 2eda013f
      Randy Dunlap 提交于
      Fix new kernel-doc warnings:
      
      Warning(include/linux/device.h:299): No description found for parameter 'name'
      Warning(include/linux/device.h:299): No description found for parameter 'subsys'
      Warning(include/linux/device.h:299): No description found for parameter 'node'
      Warning(include/linux/device.h:299): No description found for parameter 'add_dev'
      Warning(include/linux/device.h:299): No description found for parameter 'remove_dev'
      Warning(include/linux/device.h:685): No description found for parameter 'id'
      Warning(include/linux/device.h:1009): No description found for parameter '__driver'
      Warning(include/linux/device.h:1009): No description found for parameter '__register'
      Warning(include/linux/device.h:1009): No description found for parameter '__unregister'
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2eda013f
    • H
      SHM_UNLOCK: fix Unevictable pages stranded after swap · 24513264
      Hugh Dickins 提交于
      Commit cc39c6a9 ("mm: account skipped entries to avoid looping in
      find_get_pages") correctly fixed an infinite loop; but left a problem
      that find_get_pages() on shmem would return 0 (appearing to callers to
      mean end of tree) when it meets a run of nr_pages swap entries.
      
      The only uses of find_get_pages() on shmem are via pagevec_lookup(),
      called from invalidate_mapping_pages(), and from shmctl SHM_UNLOCK's
      scan_mapping_unevictable_pages().  The first is already commented, and
      not worth worrying about; but the second can leave pages on the
      Unevictable list after an unusual sequence of swapping and locking.
      
      Fix that by using shmem_find_get_pages_and_swap() (then ignoring the
      swap) instead of pagevec_lookup().
      
      But I don't want to contaminate vmscan.c with shmem internals, nor
      shmem.c with LRU locking.  So move scan_mapping_unevictable_pages() into
      shmem.c, renaming it shmem_unlock_mapping(); and rename
      check_move_unevictable_page() to check_move_unevictable_pages(), looping
      down an array of pages, oftentimes under the same lock.
      
      Leave out the "rotate unevictable list" block: that's a leftover from
      when this was used for /proc/sys/vm/scan_unevictable_pages, whose flawed
      handling involved looking at pages at tail of LRU.
      
      Was there significance to the sequence first ClearPageUnevictable, then
      test page_evictable, then SetPageUnevictable here? I think not, we're
      under LRU lock, and have no barriers between those.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Reviewed-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Minchan Kim <minchan.kim@gmail.com>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Shaohua Li <shaohua.li@intel.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: <stable@vger.kernel.org> [back to 3.1 but will need respins]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      24513264
    • M
      kdump: define KEXEC_NOTE_BYTES arch specific for s390x · cb78edfd
      Michael Holzheu 提交于
      kdump only allocates memory for the prstatus ELF note.  For s390x,
      besides of prstatus multiple ELF notes for various different register
      types are stored.  Therefore the currently allocated memory is not
      sufficient.  With this patch the KEXEC_NOTE_BYTES macro can be defined
      by architecture code and for s390x it is set to the correct size now.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Reviewed-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cb78edfd
    • A
      mm: fix warnings regarding enum migrate_mode · 6536e312
      Andrew Morton 提交于
      sparc64 allmodconfig:
      
      In file included from include/linux/compat.h:15,
                       from /usr/src/25/arch/sparc/include/asm/siginfo.h:19,
                       from include/linux/signal.h:5,
                       from include/linux/sched.h:73,
                       from arch/sparc/kernel/asm-offsets.c:13:
      include/linux/fs.h:618: warning: parameter has incomplete type
      
      It seems that my sparc64 compiler (gcc-3.4.5) doesn't like the forward
      declaration of enums.
      
      Fix this by moving the "enum migrate_mode" definition into its own header
      file.
      Acked-by: NMel Gorman <mgorman@suse.de>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Minchan Kim <minchan.kim@gmail.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Andy Isaacson <adi@hexapodia.org>
      Cc: Nai Xia <nai.xia@gmail.com>
      Cc: Johannes Weiner <jweiner@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6536e312
  7. 23 1月, 2012 6 次提交
    • J
      thermal: Rename generate_netlink_event · 2d58d7ea
      Jean Delvare 提交于
      It doesn't seem right for the thermal subsystem to export a symbol
      named generate_netlink_event. This function is thermal-specific and
      its name should reflect that fact. Rename it to
      thermal_generate_netlink_event.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NR.Durgadoss <durgadoss.r@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2d58d7ea
    • G
      driver core: remove drivers/base/sys.c and include/linux/sysdev.h · e9c688a3
      Greg Kroah-Hartman 提交于
      Now that all users of 'struct sysdev' are removed from the kernel, we
      can safely remove the .h and .c files for this code, to ensure that no
      one accidentally starts to use it again.
      
      Many thanks for Kay who did all the hard work here on making this
      happen.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e9c688a3
    • G
      net: introduce res_counter_charge_nofail() for socket allocations · 0e90b31f
      Glauber Costa 提交于
      There is a case in __sk_mem_schedule(), where an allocation
      is beyond the maximum, but yet we are allowed to proceed.
      It happens under the following condition:
      
      	sk->sk_wmem_queued + size >= sk->sk_sndbuf
      
      The network code won't revert the allocation in this case,
      meaning that at some point later it'll try to do it. Since
      this is never communicated to the underlying res_counter
      code, there is an inbalance in res_counter uncharge operation.
      
      I see two ways of fixing this:
      
      1) storing the information about those allocations somewhere
         in memcg, and then deducting from that first, before
         we start draining the res_counter,
      2) providing a slightly different allocation function for
         the res_counter, that matches the original behavior of
         the network code more closely.
      
      I decided to go for #2 here, believing it to be more elegant,
      since #1 would require us to do basically that, but in a more
      obscure way.
      Signed-off-by: NGlauber Costa <glommer@parallels.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      CC: Tejun Heo <tj@kernel.org>
      CC: Li Zefan <lizf@cn.fujitsu.com>
      CC: Laurent Chavey <chavey@google.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e90b31f
    • G
      cgroup: make sure memcg margin is 0 when over limit · 8cfd14ad
      Glauber Costa 提交于
      For the memcg sock code, we'll need to register allocations
      that are temporarily over limit. Let's make sure that margin
      is 0 in this case.
      
      I am keeping this as a separate patch, so that if any weirdness
      interaction appears in the future, we can now exactly what caused
      it.
      
      Suggested by Johannes Weiner
      Signed-off-by: NGlauber Costa <glommer@parallels.com>
      CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      CC: Johannes Weiner <hannes@cmpxchg.org>
      CC: Michal Hocko <mhocko@suse.cz>
      CC: Tejun Heo <tj@kernel.org>
      CC: Li Zefan <lizf@cn.fujitsu.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8cfd14ad
    • Y
      tcp: detect loss above high_seq in recovery · 974c1236
      Yuchung Cheng 提交于
      Correctly implement a loss detection heuristic: New sequences (above
      high_seq) sent during the fast recovery are deemed lost when higher
      sequences are SACKed.
      
      Current code does not catch these losses, because tcp_mark_head_lost()
      does not check packets beyond high_seq. The fix is straight-forward by
      checking packets until the highest sacked packet. In addition, all the
      FLAG_DATA_LOST logic are in-effective and redundant and can be removed.
      
      Update the loss heuristic comments. The algorithm above is documented
      as heuristic B, but it is redundant too because heuristic A already
      covers B.
      
      Note that this change only marks some forward-retransmitted packets LOST.
      It does NOT forbid TCP performing further CWR on new losses. A potential
      follow-up patch under preparation is to perform another CWR on "new"
      losses such as
      1) sequence above high_seq is lost (by resetting high_seq to snd_nxt)
      2) retransmission is lost.
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      974c1236
    • E
      mlx4_en: eth statistics modification · 93ece0c1
      Eugenia Emantayev 提交于
      In native mode display all available staticstics.
      In SRIOV mode on VF display only SW counters statistics,
      in SRIOV mode on hypervisor display SW counters and errors (got from FW)
      statistics.
      Signed-off-by: NEugenia Emantayev <eugenia@mellanox.co.il>
      Reviewed-by: NYevgeny Petrilin <yevgenyp@mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93ece0c1
  8. 21 1月, 2012 2 次提交
    • R
      MFD: mcp-core: fix mcp_priv() to be more type safe · 2a7f51a3
      Russell King 提交于
      mcp_priv() does unexpected things when passed a void pointer.  Make it
      a typed inline function, which ensures that it works correctly in
      these cases.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      2a7f51a3
    • R
      Revert "ARM: sa11x0: Implement autoloading of codec and codec pdata for mcp bus." · 65f2e753
      Russell King 提交于
      This reverts commit 5dd7bf59.
      
      Conflicts:
      
      	scripts/mod/file2alias.c
      
      This change is wrong on many levels.  First and foremost, it causes a
      regression.  On boot on Assabet, which this patch gives a codec id of
      'ucb1x00', it gives:
      
      	ucb1x00 ID not found: 1005
      
      0x1005 is a valid ID for the UCB1300 device.
      
      Secondly, this patch is way over the top in terms of complexity.  The
      only device which has been seen to be connected with this MCP code is
      the UCB1x00 (UCB1200, UCB1300 etc) devices, and they all use the same
      driver.  Adding a match table, requiring the codec string to match the
      hardware ID read out of the ID register, etc is completely over the top
      when we can just read the hardware ID register.
      65f2e753
  9. 20 1月, 2012 1 次提交
    • S
      PM / Hibernate: Rewrite unlock_system_sleep() to fix s2disk regression · 72081624
      Srivatsa S. Bhat 提交于
      Commit 33e638b9, "PM / Sleep: Use the freezer_count() functions in
      [un]lock_system_sleep() APIs" introduced an undesirable change in the
      behaviour of unlock_system_sleep() since freezer_count() internally calls
      try_to_freeze() - which we don't need in unlock_system_sleep().
      
      And commit bcda53fa, "PM / Sleep: Replace mutex_[un]lock(&pm_mutex) with
      [un]lock_system_sleep()" made these APIs wide-spread. This caused a
      regression in suspend-to-disk where snapshot_read() and snapshot_write()
      were getting frozen due to the try_to_freeze embedded in
      unlock_system_sleep(), since these functions were invoked when the freezing
      condition was still in effect.
      
      Fix this by rewriting unlock_system_sleep() by open-coding freezer_count()
      and dropping the try_to_freeze() part. Not only will this fix the
      regression but this will also ensure that the API only does what it is
      intended to do, and nothing more, under the hood.
      
      While at it, make the code more correct and robust by ensuring that the
      PF_FREEZER_SKIP flag gets cleared with pm_mutex held, to avoid a race with
      the freezer.
      
      Also, to be on the safer side, open-code freezer_do_not_count() as well
      (inside lock_system_sleep()), to ensure that any unrelated modification to
      freezer[_do_not]_count() does not break things again!
      Reported-and-tested-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      72081624
  10. 19 1月, 2012 1 次提交
  11. 18 1月, 2012 15 次提交