1. 02 Dec, 2008 3 commits
    • KAMEZAWA Hiroyuki's avatar
      memcg: memory hotplug fix for notifier callback · dc19f9db
      KAMEZAWA Hiroyuki authored
      Fixes for memcg/memory hotplug.
      
      While memory hotplug allocate/free memmap, page_cgroup doesn't free
      page_cgroup at OFFLINE when page_cgroup is allocated via bootomem.
      (Because freeing bootmem requires special care.)
      
      Then, if page_cgroup is allocated by bootmem and memmap is freed/allocated
      by memory hotplug, page_cgroup->page == page is no longer true.
      
      But current MEM_ONLINE handler doesn't check it and update
      page_cgroup->page if it's not necessary to allocate page_cgroup.  (This
      was not found because memmap is not freed if SPARSEMEM_VMEMMAP is y.)
      
      And I noticed that MEM_ONLINE can be called against "part of section".
      So, freeing page_cgroup at CANCEL_ONLINE will cause trouble.  (freeing
      used page_cgroup) Don't rollback at CANCEL.
      
      One more, current memory hotplug notifier is stopped by slub because it
      sets NOTIFY_STOP_MASK to return vaule.  So, page_cgroup's callback never
      be called.  (low priority than slub now.)
      
      I think this slub's behavior is not intentional(BUG). and fixes it.
      
      Another way to be considered about page_cgroup allocation:
        - free page_cgroup at OFFLINE even if it's from bootmem
          and remove specieal handler. But it requires more changes.
      
      Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12041Signed-off-by: default avatarKAMEZAWA Hiruyoki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Pavel Emelyanov <xemul@openvz.org>
      Tested-by: default avatarBadari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dc19f9db
    • Nick Piggin's avatar
      mm: vmalloc fix lazy unmapping cache aliasing · b29acbdc
      Nick Piggin authored
      Jim Radford has reported that the vmap subsystem rewrite was sometimes
      causing his VIVT ARM system to behave strangely (seemed like going into
      infinite loops trying to fault in pages to userspace).
      
      We determined that the problem was most likely due to a cache aliasing
      issue.  flush_cache_vunmap was only being called at the moment the page
      tables were to be taken down, however with lazy unmapping, this can happen
      after the page has subsequently been freed and allocated for something
      else.  The dangling alias may still have dirty data attached to it.
      
      The fix for this problem is to do the cache flushing when the caller has
      called vunmap -- it would be a bug for them to write anything else to the
      mapping at that point.
      
      That appeared to solve Jim's problems.
      Reported-by: default avatarJim Radford <radford@blackbean.org>
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b29acbdc
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 · 8650e51a
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
        ocfs2: fix regression in ocfs2_read_blocks_sync()
        ocfs2: fix return value set in init_dlmfs_fs()
        ocfs2: Small documentation update
        ocfs2: fix wake_up in unlock_ast
        ocfs2: initialize stack_user lvbptr
        ocfs2: comments typo fix
      8650e51a
  2. 01 Dec, 2008 36 commits
  3. 30 Nov, 2008 1 commit
    • Paul Mackerras's avatar
      powerpc: Fix system calls on Cell entered with XER.SO=1 · ab598b66
      Paul Mackerras authored
      It turns out that on Cell, on a kernel with CONFIG_VIRT_CPU_ACCOUNTING
      = y, if a program sets the SO (summary overflow) bit in the XER and
      then does a system call, the SO bit in CR0 will be set on return
      regardless of whether the system call detected an error.  Since CR0.SO
      is used as the error indication from the system call, this means that
      all system calls appear to fail.
      
      The reason is that the workaround for the timebase bug on Cell uses a
      compare instruction.  With CONFIG_VIRT_CPU_ACCOUNTING = y, the
      ACCOUNT_CPU_USER_ENTRY macro reads the timebase, so we end up doing a
      compare instruction, which copies XER.SO to CR0.SO.  Since we were
      doing this in the system call entry patch after clearing CR0.SO but
      before saving the CR, this meant that the saved CR image had CR0.SO
      set if XER.SO was set on entry.
      
      This fixes it by moving the clearing of CR0.SO to after the
      ACCOUNT_CPU_USER_ENTRY call in the system call entry path.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ab598b66