From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: "kernel test robot" <lkp@intel.com>,
"Michał Mirosław" <emmir@google.com>,
"Andrei Vagin" <avagin@gmail.com>,
"Danylo Mocherniuk" <mdanylo@google.com>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Suren Baghdasaryan" <surenb@google.com>,
"Greg KH" <greg@kroah.com>,
"Christian Brauner" <brauner@kernel.org>,
"Peter Xu" <peterx@redhat.com>, "Yang Shi" <shy828301@gmail.com>,
"Vlastimil Babka" <vbabka@suse.cz>,
"Zach O'Keefe" <zokeefe@google.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
"Dan Williams" <dan.j.williams@intel.com>,
kernel@collabora.com,
"Gabriel Krisman Bertazi" <krisman@collabora.com>,
"David Hildenbrand" <david@redhat.com>,
"Peter Enderborg" <peter.enderborg@sony.com>,
"open list : KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"open list : PROC FILESYSTEM" <linux-fsdevel@vger.kernel.org>,
"Paul Gofman" <pgofman@codeweavers.com>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH v6 2/3] fs/proc/task_mmu: Implement IOCTL to get and/or the clear info about PTEs
Date: Fri, 11 Nov 2022 22:53:21 +0500 [thread overview]
Message-ID: <d69b349e-fe8d-5ffc-01cb-8ec05fc32be9@collabora.com> (raw)
In-Reply-To: <202211120107.cYLiq2cH-lkp@intel.com>
I've fixed these build failure for the next patch iteration. Please comment
and review on the patch. I'll wait for a few days before sending next version.
On 11/11/22 10:13 PM, kernel test robot wrote:
> Hi Muhammad,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on next-20221109]
> [also build test ERROR on v6.1-rc4]
> [cannot apply to shuah-kselftest/next shuah-kselftest/fixes linus/master v6.1-rc4 v6.1-rc3 v6.1-rc2]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Muhammad-Usama-Anjum/Implement-IOCTL-to-get-and-or-the-clear-info-about-PTEs/20221109-182618
> patch link: https://lore.kernel.org/r/20221109102303.851281-3-usama.anjum%40collabora.com
> patch subject: [PATCH v6 2/3] fs/proc/task_mmu: Implement IOCTL to get and/or the clear info about PTEs
> config: arm-buildonly-randconfig-r006-20221111
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 463da45892e2d2a262277b91b96f5f8c05dc25d0)
> 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
> # install arm cross compiling tool for clang build
> # apt-get install binutils-arm-linux-gnueabi
> # https://github.com/intel-lab-lkp/linux/commit/b329378abd03a741ff7250ec1b60292c893476da
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Muhammad-Usama-Anjum/Implement-IOCTL-to-get-and-or-the-clear-info-about-PTEs/20221109-182618
> git checkout b329378abd03a741ff7250ec1b60292c893476da
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash fs/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>>> fs/proc/task_mmu.c:1882:41: error: use of undeclared identifier 'HPAGE_SIZE'
> if ((IS_CLEAR_OP(p) && (end - addr < HPAGE_SIZE))) {
> ^
> 1 error generated.
>
>
> vim +/HPAGE_SIZE +1882 fs/proc/task_mmu.c
>
> 1856
> 1857 static int pagemap_scan_pmd_entry(pmd_t *pmd, unsigned long addr,
> 1858 unsigned long end, struct mm_walk *walk)
> 1859 {
> 1860 struct pagemap_scan_private *p = walk->private;
> 1861 struct vm_area_struct *vma = walk->vma;
> 1862 unsigned int len;
> 1863 spinlock_t *ptl;
> 1864 int ret = 0;
> 1865 pte_t *pte;
> 1866 bool dirty_vma = (p->flags & PAGEMAP_NO_REUSED_REGIONS) ?
> 1867 (false) : (vma->vm_flags & VM_SOFTDIRTY);
> 1868
> 1869 if ((walk->vma->vm_end < addr) || (p->max_pages && p->found_pages == p->max_pages))
> 1870 return 0;
> 1871
> 1872 end = min(end, walk->vma->vm_end);
> 1873
> 1874 ptl = pmd_trans_huge_lock(pmd, vma);
> 1875 if (ptl) {
> 1876 if (dirty_vma || check_soft_dirty_pmd(vma, addr, pmd, false)) {
> 1877 /*
> 1878 * Break huge page into small pages if operation needs to be performed is
> 1879 * on a portion of the huge page or the return buffer cannot store complete
> 1880 * data.
> 1881 */
>> 1882 if ((IS_CLEAR_OP(p) && (end - addr < HPAGE_SIZE))) {
> 1883 spin_unlock(ptl);
> 1884 split_huge_pmd(vma, pmd, addr);
> 1885 goto process_smaller_pages;
> 1886 }
> 1887
> 1888 if (IS_GET_OP(p)) {
> 1889 len = (end - addr)/PAGE_SIZE;
> 1890 if (p->max_pages && p->found_pages + len > p->max_pages)
> 1891 len = p->max_pages - p->found_pages;
> 1892
> 1893 ret = add_to_out(dirty_vma ||
> 1894 check_soft_dirty_pmd(vma, addr, pmd, false),
> 1895 vma->vm_file, pmd_present(*pmd), is_swap_pmd(*pmd),
> 1896 p, addr, len);
> 1897 }
> 1898 if (!ret && IS_CLEAR_OP(p))
> 1899 check_soft_dirty_pmd(vma, addr, pmd, true);
> 1900 }
> 1901 spin_unlock(ptl);
> 1902 return 0;
> 1903 }
> 1904
> 1905 process_smaller_pages:
> 1906 if (pmd_trans_unstable(pmd))
> 1907 return 0;
> 1908
> 1909 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
> 1910 for (; addr < end && !ret && (!p->max_pages || (p->found_pages < p->max_pages))
> 1911 ; pte++, addr += PAGE_SIZE) {
> 1912 if (IS_GET_OP(p))
> 1913 ret = add_to_out(dirty_vma || check_soft_dirty(vma, addr, pte, false),
> 1914 vma->vm_file, pte_present(*pte),
> 1915 is_swap_pte(*pte), p, addr, 1);
> 1916 if (!ret && IS_CLEAR_OP(p))
> 1917 check_soft_dirty(vma, addr, pte, true);
> 1918 }
> 1919 pte_unmap_unlock(pte - 1, ptl);
> 1920 cond_resched();
> 1921
> 1922 return 0;
> 1923 }
> 1924
>
--
BR,
Muhammad Usama Anjum
next prev parent reply other threads:[~2022-11-11 17:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 10:23 [PATCH v6 0/3] Implement IOCTL to get and/or the clear info about PTEs Muhammad Usama Anjum
2022-11-09 10:23 ` [PATCH v6 1/3] fs/proc/task_mmu: update functions to clear the soft-dirty PTE bit Muhammad Usama Anjum
2022-11-09 10:23 ` [PATCH v6 2/3] fs/proc/task_mmu: Implement IOCTL to get and/or the clear info about PTEs Muhammad Usama Anjum
2022-11-09 23:54 ` Andrei Vagin
2022-11-11 10:10 ` Muhammad Usama Anjum
2022-11-10 17:58 ` kernel test robot
2022-11-11 17:13 ` kernel test robot
2022-11-11 17:53 ` Muhammad Usama Anjum [this message]
2022-11-18 1:32 ` kernel test robot
2022-12-12 20:42 ` Cyrill Gorcunov
2022-12-13 13:04 ` Muhammad Usama Anjum
2022-12-13 22:22 ` Cyrill Gorcunov
2022-11-09 10:23 ` [PATCH v6 3/3] selftests: vm: add pagemap ioctl tests Muhammad Usama Anjum
2022-11-09 10:34 ` [PATCH v6 0/3] Implement IOCTL to get and/or the clear info about PTEs David Hildenbrand
2022-11-11 7:08 ` Muhammad Usama Anjum
2022-11-14 15:46 ` David Hildenbrand
2022-11-21 15:00 ` Muhammad Usama Anjum
2022-11-21 15:55 ` David Hildenbrand
2022-11-30 11:42 ` Muhammad Usama Anjum
2022-11-30 12:10 ` David Hildenbrand
2022-12-05 15:29 ` Muhammad Usama Anjum
2022-12-05 15:39 ` David Hildenbrand
2022-11-23 14:11 ` 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=d69b349e-fe8d-5ffc-01cb-8ec05fc32be9@collabora.com \
--to=usama.anjum@collabora.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@gmail.com \
--cc=brauner@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=emmir@google.com \
--cc=greg@kroah.com \
--cc=gustavoars@kernel.org \
--cc=kernel@collabora.com \
--cc=krisman@collabora.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=mdanylo@google.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peter.enderborg@sony.com \
--cc=peterx@redhat.com \
--cc=pgofman@codeweavers.com \
--cc=shy828301@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=zokeefe@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.