Re: [PATCH mmotm/next] mm: memcontrol: rewrite charge API: fix shmem_unuse

2014-07-02 Thread Johannes Weiner
On Mon, Jun 30, 2014 at 03:48:39PM -0700, Hugh Dickins wrote: > Under shmem swapping and swapoff load, I sometimes hit the > VM_BUG_ON_PAGE(!page->mapping) in mem_cgroup_commit_charge() at > mm/memcontrol.c:6502! Each time it has been a call from shmem_unuse(). > > Yes, there are some cases (most

Re: [PATCH mmotm/next] mm: memcontrol: rewrite charge API: fix shmem_unuse

2014-06-30 Thread Hugh Dickins
On Mon, 30 Jun 2014, Andrew Morton wrote: > On Mon, 30 Jun 2014 17:10:54 -0700 (PDT) Hugh Dickins > wrote: > > On Mon, 30 Jun 2014, Andrew Morton wrote: > > > On Mon, 30 Jun 2014 15:48:39 -0700 (PDT) Hugh Dickins > > > wrote: > > > > - return 0; > > > > + return -EAG

Re: [PATCH mmotm/next] mm: memcontrol: rewrite charge API: fix shmem_unuse

2014-06-30 Thread Andrew Morton
On Mon, 30 Jun 2014 17:10:54 -0700 (PDT) Hugh Dickins wrote: > On Mon, 30 Jun 2014, Andrew Morton wrote: > > On Mon, 30 Jun 2014 15:48:39 -0700 (PDT) Hugh Dickins > > wrote: > > > - return 0; > > > + return -EAGAIN; > > > > Maybe it's time to document the shmem_unuse_inode() re

Re: [PATCH mmotm/next] mm: memcontrol: rewrite charge API: fix shmem_unuse

2014-06-30 Thread Hugh Dickins
On Mon, 30 Jun 2014, Andrew Morton wrote: > On Mon, 30 Jun 2014 15:48:39 -0700 (PDT) Hugh Dickins > wrote: > > - return 0; > > + return -EAGAIN; > > Maybe it's time to document the shmem_unuse_inode() return values. Oh dear. I had hoped they would look after themselves. Th

Re: [PATCH mmotm/next] mm: memcontrol: rewrite charge API: fix shmem_unuse

2014-06-30 Thread Andrew Morton
On Mon, 30 Jun 2014 15:48:39 -0700 (PDT) Hugh Dickins wrote: > Under shmem swapping and swapoff load, I sometimes hit the > VM_BUG_ON_PAGE(!page->mapping) in mem_cgroup_commit_charge() at > mm/memcontrol.c:6502! Each time it has been a call from shmem_unuse(). > > Yes, there are some cases (mos

[PATCH mmotm/next] mm: memcontrol: rewrite charge API: fix shmem_unuse

2014-06-30 Thread Hugh Dickins
Under shmem swapping and swapoff load, I sometimes hit the VM_BUG_ON_PAGE(!page->mapping) in mem_cgroup_commit_charge() at mm/memcontrol.c:6502! Each time it has been a call from shmem_unuse(). Yes, there are some cases (most commonly when the page being unswapped is in a file being unlinked and