1. 18 Aug, 2009 1 commit
  2. 17 Nov, 2009 1 commit
  3. 11 Nov, 2009 2 commits
    • Robert Jennings's avatar
      The Collaborative Memory Manager (CMM) module allocates individual pages · 92c311b9
      Robert Jennings authored
      over time that are not migratable.  On a long running system this can
      severely impact the ability to find enough pages to support a hotplug
      memory remove operation.
      
      This patch adds a memory isolation notifier and a memory hotplug notifier.
      The memory isolation notifier will return the number of pages found in
      the range specified.  This is used to determine if all of the used pages
      in a pageblock are owned by the balloon (or other entities in the notifier
      chain).  The hotplug notifier will free pages in the range which is to be
      removed.  The priority of this hotplug notifier is low so that it will be
      called near last, this helps avoids removing loaned pages in operations
      that fail due to other handlers.
      
      CMM activity will be halted when hotplug remove operations are active and
      resume activity after a delay period to allow the hypervisor time to
      adjust.
      Signed-off-by: default avatarRobert Jennings <rcj@linux.vnet.ibm.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Brian King <brking@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Gerald Schaefer <geralds@linux.vnet.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      92c311b9
    • Robert Jennings's avatar
      Memory balloon drivers can allocate a large amount of memory which is not · 3a2c66c2
      Robert Jennings authored
      movable but could be freed to accomodate memory hotplug remove.
      
      Prior to calling the memory hotplug notifier chain the memory in the
      pageblock is isolated.  Currently, if the migrate type is not
      MIGRATE_MOVABLE the isolation will not proceed, causing the memory removal
      for that page range to fail.
      
      Rather than failing pageblock isolation if the migrateteype is not
      MIGRATE_MOVABLE, this patch checks if all of the pages in the pageblock,
      and not on the LRU, are owned by a registered balloon driver (or other
      entity) using a notifier chain.  If all of the non-movable pages are owned
      by a balloon, they can be freed later through the memory notifier chain
      and the range can still be isolated in set_migratetype_isolate().
      Signed-off-by: default avatarRobert Jennings <rcj@linux.vnet.ibm.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Brian King <brking@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Gerald Schaefer <geralds@linux.vnet.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      3a2c66c2
  4. 18 Sep, 2009 1 commit
  5. 17 Nov, 2009 2 commits
  6. 03 Nov, 2009 1 commit
  7. 13 Aug, 2009 1 commit
  8. 10 Nov, 2009 1 commit
  9. 03 Nov, 2009 1 commit
  10. 11 Nov, 2009 1 commit
  11. 16 Nov, 2009 1 commit
  12. 24 Aug, 2009 1 commit
  13. 11 Nov, 2009 1 commit
  14. 16 Nov, 2009 1 commit
  15. 12 Nov, 2009 1 commit
  16. 28 Oct, 2009 5 commits
  17. 11 Nov, 2009 1 commit
  18. 12 Oct, 2009 2 commits
  19. 29 Sep, 2009 1 commit
  20. 11 Nov, 2009 1 commit
  21. 20 Aug, 2009 1 commit
  22. 25 Sep, 2009 1 commit
    • Andrew Morton's avatar
      Presently acpi-cpufreq will perform the MSR read on the first CPU in the · b192f3b1
      Andrew Morton authored
      mask.  That's inefficient if that CPU differs from the current CPU. 
      Because we have to perform a cross-CPU call, but we could have run the
      rdmsr on the current CPU.
      
      So switch to using the new smp_call_function_any(), which will perform the
      call on the current CPU if that CPU is present in the mask (it is).
      
      Cc: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: Zhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      b192f3b1
  23. 11 Nov, 2009 1 commit
  24. 09 Nov, 2009 1 commit
  25. 28 Oct, 2009 2 commits
  26. 14 Oct, 2009 1 commit
  27. 06 Oct, 2009 1 commit
  28. 30 Sep, 2009 1 commit
  29. 11 Nov, 2009 2 commits
    • Feng Tang's avatar
      Recent hrtimer code will set the start info to a hrtimer only when that · 514698bf
      Feng Tang authored
      flag is set, then the start info of all hrtimers will always be
      uninitialised before a "echo 1 > /proc/timer_stats", thus the
      /proc/timer_lists will have something like:
      
      active timers:
       #0: <c27d46b0>, tick_sched_timer, S:01, <(null)>, /-1
       # expires at 91062000000-91062000000 nsecs [in 156071 to 156071 nsecs]
       #1: <efb81b6c>, hrtimer_wakeup, S:01, <(null)>, /-1
       # expires at 91062300331-91062350331 nsecs [in 456402 to 506402 nsecs]
       #2: <efac9b6c>, hrtimer_wakeup, S:01, <(null)>, /-1
       # expires at 91068699811-91068749811 nsecs [in 6855882 to 6905882 nsecs]
       #3: <efacdb6c>, hrtimer_wakeup, S:01, <(null)>, /-1
       # expires at 91068755511-91068805511 nsecs [in 6911582 to 6961582 nsecs]
       #4: <efa95b6c>, hrtimer_wakeup, S:01, <(null)>, /-1
       # expires at 91068806066-91068856066 nsecs [in 6962137 to 7012137 nsecs]
       .....
      
      This patch fixes it.
      Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      514698bf
    • David Howells's avatar
      Ignore the address parameter in the various file_mmap() security checks · 1b91f0f2
      David Howells authored
      when CONFIG_MMU=n as the address hint is ignored under those
      circumstances, and in any case the minimum mapping address check is
      pointless in NOMMU mode.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reported-by: default avatarGraff Yang <graf.yang@analog.com>
      Cc: James Morris <jmorris@namei.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      1b91f0f2
  30. 10 Nov, 2009 2 commits
    • Alexey Kuznetsov's avatar
      Asynchronous scan (scsi_add_lun()) sets state to SDEV_RUNNING, but the · 48186e00
      Alexey Kuznetsov authored
      device is not registered in sysfs.  Before async scan it was OK, because
      before releasing scan_mutex old code called either scsi_sysfs_add_sdev()
      or scsi_destroy_sdev() and, therefore, completed the work or discarded it.
      
      With async scan the invariant is broken and scsi crashes in
      __scsi_remove_device() when trying to unregister not registered devices.
      
      The fix could be introducing new state(s), which is equivalent to
      SDEV_RUNNING, except for one thing, we know that scsi_sysfs_add_sdev() has
      not been called yet.  Or a separate flag, because the state can be
      SDEV_BLOCK or even something else.
      
      Simpler way is just to check that the device is regstered in sysfs before
      unregistering.  Another operations in __scsi_remove_device() seem to be
      idempotent or even required, because scsi_add_lun() makes some part of
      work duplicated in scsi_sysfs_add_sdev().
      Signed-off-by: default avatarAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      48186e00
    • Alexey Kuznetsov's avatar
      __scsi_remove_device() in scsi_forget_host() is executed out of scan_mutex · 657a4c0e
      Alexey Kuznetsov authored
      and races with scsi_destroy_sdev() <- scsi_sysfs_add_devices() <-
      scsi_finish_async_scan().  The result is use after free and/or double
      free, oops.
      
      The fix is simple, move scsi_forget_host() under scan_mutex.
      
      scsi_forget_host() is just sequence of __scsi_remove_device().  All
      another calls of __scsi_remove_device() are made under scan_mutex.  So
      that it is safe.
      Signed-off-by: default avatarAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      657a4c0e