Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Peter Xu <peterx@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	peterx@redhat.com, Johannes Weiner <hannes@cmpxchg.org>,
	David Hildenbrand <david@redhat.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Alistair Popple <apopple@nvidia.com>
Subject: Re: [PATCH] mm: Avoid unnecessary page fault retires on shared memory types
Date: Fri, 6 May 2022 15:47:14 +0800	[thread overview]
Message-ID: <202205061513.jhn9vVtI-lkp@intel.com> (raw)
In-Reply-To: <20220505211748.41127-1-peterx@redhat.com>

Hi Peter,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hnaz-mm/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Peter-Xu/mm-Avoid-unnecessary-page-fault-retires-on-shared-memory-types/20220506-051845
base:   https://github.com/hnaz/linux-mm master
config: sparc-defconfig (https://download.01.org/0day-ci/archive/20220506/202205061513.jhn9vVtI-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/e5356147afd3824144b605c428f1b892addd11d0
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Peter-Xu/mm-Avoid-unnecessary-page-fault-retires-on-shared-memory-types/20220506-051845
        git checkout e5356147afd3824144b605c428f1b892addd11d0
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   arch/sparc/mm/fault_32.c: In function 'force_user_fault':
>> arch/sparc/mm/fault_32.c:347:13: error: 'fault' undeclared (first use in this function)
     347 |         if (fault & VM_FAULT_COMPLETED)
         |             ^~~~~
   arch/sparc/mm/fault_32.c:347:13: note: each undeclared identifier is reported only once for each function it appears in


vim +/fault +347 arch/sparc/mm/fault_32.c

   309	
   310	/* This always deals with user addresses. */
   311	static void force_user_fault(unsigned long address, int write)
   312	{
   313		struct vm_area_struct *vma;
   314		struct task_struct *tsk = current;
   315		struct mm_struct *mm = tsk->mm;
   316		unsigned int flags = FAULT_FLAG_USER;
   317		int code;
   318	
   319		code = SEGV_MAPERR;
   320	
   321		mmap_read_lock(mm);
   322		vma = find_vma(mm, address);
   323		if (!vma)
   324			goto bad_area;
   325		if (vma->vm_start <= address)
   326			goto good_area;
   327		if (!(vma->vm_flags & VM_GROWSDOWN))
   328			goto bad_area;
   329		if (expand_stack(vma, address))
   330			goto bad_area;
   331	good_area:
   332		code = SEGV_ACCERR;
   333		if (write) {
   334			if (!(vma->vm_flags & VM_WRITE))
   335				goto bad_area;
   336			flags |= FAULT_FLAG_WRITE;
   337		} else {
   338			if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
   339				goto bad_area;
   340		}
   341		switch (handle_mm_fault(vma, address, flags, NULL)) {
   342		case VM_FAULT_SIGBUS:
   343		case VM_FAULT_OOM:
   344			goto do_sigbus;
   345		}
   346		/* The fault is fully completed (including releasing mmap lock) */
 > 347		if (fault & VM_FAULT_COMPLETED)
   348			return;
   349		mmap_read_unlock(mm);
   350		return;
   351	bad_area:
   352		mmap_read_unlock(mm);
   353		__do_fault_siginfo(code, SIGSEGV, tsk->thread.kregs, address);
   354		return;
   355	
   356	do_sigbus:
   357		mmap_read_unlock(mm);
   358		__do_fault_siginfo(BUS_ADRERR, SIGBUS, tsk->thread.kregs, address);
   359	}
   360	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


  reply	other threads:[~2022-05-06  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 21:17 [PATCH] mm: Avoid unnecessary page fault retires on shared memory types Peter Xu
2022-05-06  7:47 ` kernel test robot [this message]
2022-05-06 20:27 ` Johannes Weiner
2022-05-09 15:35   ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202205061513.jhn9vVtI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox