1. 09 Jun, 2012 3 commits
    • Michal Hocko's avatar
      mm: consider all swapped back pages in used-once logic · dce59c2f
      Michal Hocko authored
      commit e4898273 upstream.
      
      Commit 64574746 ("vmscan: detect mapped file pages used only once")
      made mapped pages have another round in inactive list because they might
      be just short lived and so we could consider them again next time.  This
      heuristic helps to reduce pressure on the active list with a streaming
      IO worklods.
      
      This patch fixes a regression introduced by this commit for heavy shmem
      based workloads because unlike Anon pages, which are excluded from this
      heuristic because they are usually long lived, shmem pages are handled
      as a regular page cache.
      
      This doesn't work quite well, unfortunately, if the workload is mostly
      backed by shmem (in memory database sitting on 80% of memory) with a
      streaming IO in the background (backup - up to 20% of memory).  Anon
      inactive list is full of (dirty) shmem pages when watermarks are hit.
      Shmem pages are kept in the inactive list (they are referenced) in the
      first round and it is hard to reclaim anything else so we reach lower
      scanning priorities very quickly which leads to an excessive swap out.
      
      Let's fix this by excluding all swap backed pages (they tend to be long
      lived wrt.  the regular page cache anyway) from used-once heuristic and
      rather activate them if they are referenced.
      
      The customer's workload is shmem backed database (80% of RAM) and they
      are measuring transactions/s with an IO in the background (20%).
      Transactions touch more or less random rows in the table.  The
      transaction rate fell by a factor of 3 (in the worst case) because of
      commit 64574746.  This patch restores the previous numbers.
      Signed-off-by: default avatarMichal Hocko <mhocko@suse.cz>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Reviewed-by: default avatarRik van Riel <riel@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dce59c2f
    • Jun'ichi Nomura's avatar
      SCSI: Fix dm-multipath starvation when scsi host is busy · f4090d82
      Jun'ichi Nomura authored
      commit b7e94a16 upstream.
      
      block congestion control doesn't have any concept of fairness across
      multiple queues.  This means that if SCSI reports the host as busy in
      the queue congestion control it can result in an unfair starvation
      situation in dm-mp if there are multiple multipath devices on the same
      host.  For example:
      http://www.redhat.com/archives/dm-devel/2012-May/msg00123.html
      
      The fix for this is to report only the sdev busy state (and ignore the
      host busy state) in the block congestion control call back.
      The host is still congested, but the SCSI subsystem will sort out the
      congestion in a fair way because it knows the relation between the
      queues and the host.
      
      [jejb: fixed up trailing whitespace]
      Reported-by: default avatarBernd Schubert <bernd.schubert@itwm.fraunhofer.de>
      Tested-by: default avatarBernd Schubert <bernd.schubert@itwm.fraunhofer.de>
      Signed-off-by: default avatarJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f4090d82
    • James Bottomley's avatar
      SCSI: fix scsi_wait_scan · af9c3bad
      James Bottomley authored
      commit 1ff2f403 upstream.
      
      Commit  c7510859
      Author: Rafael J. Wysocki <rjw@sisk.pl>
      Date:   Sun Apr 12 20:06:56 2009 +0200
      
          PM/Hibernate: Wait for SCSI devices scan to complete during resume
      
      Broke the scsi_wait_scan module in 2.6.30.  Apparently debian still uses it so
      fix it and backport to stable before removing it in 3.6.
      
      The breakage is caused because the function template in
      include/scsi/scsi_scan.h is defined to be a nop unless SCSI is built in.
      That means that in the modular case (which is every distro), the
      scsi_wait_scan module does a simple async_synchronize_full() instead of
      waiting for scans.
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      af9c3bad
  2. 01 Jun, 2012 37 commits