Re: [PATCH] mm, memcg: fix reclaim deadlock with writeback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michal,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc6 next-20181212]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Michal-Hocko/mm-memcg-fix-reclaim-deadlock-with-writeback/20181212-224633
config: x86_64-randconfig-x000-201849 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   mm/memory.c: In function '__do_fault':
>> mm/memory.c:3001:45: error: 'struct vm_area_struct' has no member named 'vm'
      vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm>mm, vmf->address);
                                                ^~
>> mm/memory.c:3001:50: error: 'mm' undeclared (first use in this function); did you mean 'hmm'?
      vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm>mm, vmf->address);
                                                     ^~
                                                     hmm
   mm/memory.c:3001:50: note: each undeclared identifier is reported only once for each function it appears in

vim +3001 mm/memory.c

  2985	
  2986	/*
  2987	 * The mmap_sem must have been held on entry, and may have been
  2988	 * released depending on flags and vma->vm_ops->fault() return value.
  2989	 * See filemap_fault() and __lock_page_retry().
  2990	 */
  2991	static vm_fault_t __do_fault(struct vm_fault *vmf)
  2992	{
  2993		struct vm_area_struct *vma = vmf->vma;
  2994		vm_fault_t ret;
  2995	
  2996		/*
  2997		 * Preallocate pte before we take page_lock because this might lead to
  2998		 * deadlocks for memcg reclaim which waits for pages under writeback.
  2999		 */
  3000		if (pmd_none(*vmf->pmd) && !vmf->prealloc_pte) {
> 3001			vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm>mm, vmf->address);
  3002			if (!vmf->prealloc_pte)
  3003				return VM_FAULT_OOM;
  3004			smp_wmb(); /* See comment in __pte_alloc() */
  3005		}
  3006	
  3007		ret = vma->vm_ops->fault(vmf);
  3008		if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY |
  3009				    VM_FAULT_DONE_COW)))
  3010			return ret;
  3011	
  3012		if (unlikely(PageHWPoison(vmf->page))) {
  3013			if (ret & VM_FAULT_LOCKED)
  3014				unlock_page(vmf->page);
  3015			put_page(vmf->page);
  3016			vmf->page = NULL;
  3017			return VM_FAULT_HWPOISON;
  3018		}
  3019	
  3020		if (unlikely(!(ret & VM_FAULT_LOCKED)))
  3021			lock_page(vmf->page);
  3022		else
  3023			VM_BUG_ON_PAGE(!PageLocked(vmf->page), vmf->page);
  3024	
  3025		return ret;
  3026	}
  3027	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux