1. 20 Feb, 2012 3 commits
    • Olaf Hering's avatar
      xenpaging: reduce number of qemu cache flushes · d3d413f0
      Olaf Hering authored
      Currently the command to flush the qemu cache is called alot if there
      are no more pages to evict. This causes churn in the logfiles, and qemu
      can not release more pages anyway since the last command.
      
      Fix this by remembering the current number of paged-out gfns, if this
      number did not change since the last flush command then sending another
      new flush command will not free any more gfns.
      
      Remove return code from xenpaging_mem_paging_flush_ioemu_cache() since
      errors do not matter, and will be handled elsewhere. Also failure to
      send the flush command is not fatal.
      Signed-off-by: default avatarOlaf Hering <olaf@aepfle.de>
      Committed-by: Ian Jackson <ian.jackson.citrix.com>
      d3d413f0
    • Olaf Hering's avatar
      xenpaging: no poll timeout while page-out is in progress · 2ee002a8
      Olaf Hering authored
      The main loop calls xenpaging_wait_for_event_or_timeout() unconditionally
      before doing any work. This function calls poll() with a timeout of 100ms. As
      a result the page-out process is very slow due to the delay in poll().
      
      Call poll() without timeout so that it returns immediately until the page-out
      is done. Page-out is done when either the policy finds no more pages to
      nominate or when the requested number of pages is reached.
      
      The condition is cleared when a watch event arrives, so that processing the
      new target is not delayed once again by poll().
      
      v2:
      - no poll timeout also when large number of evicts is pending
      Signed-off-by: default avatarOlaf Hering <olaf@aepfle.de>
      Committed-by: Ian Jackson <ian.jackson.citrix.com>
      2ee002a8
    • Olaf Hering's avatar
      xenpaging: use flat index for pagefile and page-in requests · 3bf345e6
      Olaf Hering authored
      This change is based on an idea by <hongkaixing@huawei.com> and
      <bicky.shi@huawei.com>.
      
      Scanning the victims[] array is time consuming with a large number of
      target pages. Replace the loop to find the slot in the pagefile which
      holds the requested gfn with an index.
      
      Remove the victims array and replace it with a flat array. This array
      holds the gfn for a given slot in the pagefile. Adjust all users of the
      victims array.
      
      Rename variable in main() from i to slot to clearify the meaning.
      
      Update xenpaging_evict_page() to pass a pointer to xen_pfn_t to
      xc_map_foreign_pages().
      
      Update policy_choose_victim() to return either a gfn or INVALID_MFN.
      Signed-off-by: default avatarOlaf Hering <olaf@aepfle.de>
      Committed-by: Ian Jackson <ian.jackson.citrix.com>
      3bf345e6
  2. 21 Feb, 2012 1 commit
  3. 20 Feb, 2012 17 commits
  4. 19 Jan, 2012 2 commits
  5. 20 Feb, 2012 3 commits
  6. 17 Feb, 2012 2 commits
  7. 16 Feb, 2012 5 commits
  8. 15 Feb, 2012 7 commits