1. 13 9月, 2013 3 次提交
  2. 12 9月, 2013 1 次提交
    • N
      mm: migrate: check movability of hugepage in unmap_and_move_huge_page() · 83467efb
      Naoya Horiguchi 提交于
      Currently hugepage migration works well only for pmd-based hugepages
      (mainly due to lack of testing,) so we had better not enable migration of
      other levels of hugepages until we are ready for it.
      
      Some users of hugepage migration (mbind, move_pages, and migrate_pages) do
      page table walk and check pud/pmd_huge() there, so they are safe.  But the
      other users (softoffline and memory hotremove) don't do this, so without
      this patch they can try to migrate unexpected types of hugepages.
      
      To prevent this, we introduce hugepage_migration_support() as an
      architecture dependent check of whether hugepage are implemented on a pmd
      basis or not.  And on some architecture multiple sizes of hugepages are
      available, so hugepage_migration_support() also checks hugepage size.
      Signed-off-by: NNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Hillf Danton <dhillf@gmail.com>
      Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      83467efb
  3. 03 9月, 2013 1 次提交
  4. 02 9月, 2013 2 次提交
  5. 31 8月, 2013 1 次提交
  6. 29 8月, 2013 1 次提交
  7. 28 8月, 2013 2 次提交
  8. 22 8月, 2013 3 次提交
  9. 20 8月, 2013 5 次提交
  10. 16 8月, 2013 1 次提交
    • L
      Fix TLB gather virtual address range invalidation corner cases · 2b047252
      Linus Torvalds 提交于
      Ben Tebulin reported:
      
       "Since v3.7.2 on two independent machines a very specific Git
        repository fails in 9/10 cases on git-fsck due to an SHA1/memory
        failures.  This only occurs on a very specific repository and can be
        reproduced stably on two independent laptops.  Git mailing list ran
        out of ideas and for me this looks like some very exotic kernel issue"
      
      and bisected the failure to the backport of commit 53a59fc6 ("mm:
      limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT").
      
      That commit itself is not actually buggy, but what it does is to make it
      much more likely to hit the partial TLB invalidation case, since it
      introduces a new case in tlb_next_batch() that previously only ever
      happened when running out of memory.
      
      The real bug is that the TLB gather virtual memory range setup is subtly
      buggered.  It was introduced in commit 597e1c35 ("mm/mmu_gather:
      enable tlb flush range in generic mmu_gather"), and the range handling
      was already fixed at least once in commit e6c495a9 ("mm: fix the TLB
      range flushed when __tlb_remove_page() runs out of slots"), but that fix
      was not complete.
      
      The problem with the TLB gather virtual address range is that it isn't
      set up by the initial tlb_gather_mmu() initialization (which didn't get
      the TLB range information), but it is set up ad-hoc later by the
      functions that actually flush the TLB.  And so any such case that forgot
      to update the TLB range entries would potentially miss TLB invalidates.
      
      Rather than try to figure out exactly which particular ad-hoc range
      setup was missing (I personally suspect it's the hugetlb case in
      zap_huge_pmd(), which didn't have the same logic as zap_pte_range()
      did), this patch just gets rid of the problem at the source: make the
      TLB range information available to tlb_gather_mmu(), and initialize it
      when initializing all the other tlb gather fields.
      
      This makes the patch larger, but conceptually much simpler.  And the end
      result is much more understandable; even if you want to play games with
      partial ranges when invalidating the TLB contents in chunks, now the
      range information is always there, and anybody who doesn't want to
      bother with it won't introduce subtle bugs.
      
      Ben verified that this fixes his problem.
      Reported-bisected-and-tested-by: NBen Tebulin <tebulin@googlemail.com>
      Build-testing-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Build-testing-by: NRichard Weinberger <richard.weinberger@gmail.com>
      Reviewed-by: NMichal Hocko <mhocko@suse.cz>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2b047252
  11. 09 8月, 2013 3 次提交
    • C
      arm64: KVM: use 'int' instead of 'u32' for variable 'target' in kvm_host.h. · 6c8c0c4d
      Chen Gang 提交于
      'target' will be set to '-1' in kvm_arch_vcpu_init(), and it need check
      'target' whether less than zero or not in kvm_vcpu_initialized().
      
      So need define target as 'int' instead of 'u32', just like ARM has done.
      
      The related warning:
      
        arch/arm64/kvm/../../../arch/arm/kvm/arm.c:497:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      [Marc: reformated the Subject line to fit the series]
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      6c8c0c4d
    • M
      arm64: KVM: add missing dsb before invalidating Stage-2 TLBs · f142e5ee
      Marc Zyngier 提交于
      When performing a Stage-2 TLB invalidation, it is necessary to
      make sure the write to the page tables is observable by all CPUs.
      
      For this purpose, add dsb instructions to __kvm_tlb_flush_vmid_ipa
      and __kvm_flush_vm_context before doing the TLB invalidation itself.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      f142e5ee
    • M
      arm64: KVM: perform save/restore of PAR_EL1 · 1bbd8054
      Marc Zyngier 提交于
      Not saving PAR_EL1 is an unfortunate oversight. If the guest
      performs an AT* operation and gets scheduled out before reading
      the result of the translation from PAREL1, it could become
      corrupted by another guest or the host.
      
      Saving this register is made slightly more complicated as KVM also
      uses it on the permission fault handling path, leading to an ugly
      "stash and restore" sequence. Fortunately, this is already a slow
      path so we don't really care. Also, Linux doesn't do any AT*
      operation, so Linux guests are not impacted by this bug.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      1bbd8054
  12. 01 8月, 2013 2 次提交
  13. 26 7月, 2013 1 次提交
  14. 24 7月, 2013 1 次提交
  15. 23 7月, 2013 2 次提交
  16. 19 7月, 2013 4 次提交
  17. 15 7月, 2013 1 次提交
    • P
      arm64: delete __cpuinit usage from all users · b8c6453a
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      are flagged as __cpuinit  -- so if we remove the __cpuinit from
      arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      content into no-ops as early as possible, since that will get rid
      of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the arch/arm64 uses of the __cpuinit macros from
      all C files.  Currently arm64 does not have any __CPUINIT used in
      assembly files.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      b8c6453a
  18. 11 7月, 2013 1 次提交
  19. 04 7月, 2013 5 次提交