From: kbuild test robot <lkp@intel.com>
To: jglisse@redhat.com
Cc: kbuild-all@01.org, linux-mm@kvack.org,
"Andrew Morton" <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
"Jérôme Glisse" <jglisse@redhat.com>,
"Matthew Wilcox" <mawilcox@microsoft.com>,
"Ross Zwisler" <zwisler@kernel.org>, "Jan Kara" <jack@suse.cz>,
"Dan Williams" <dan.j.williams@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Michal Hocko" <mhocko@kernel.org>,
"Christian Koenig" <christian.koenig@amd.com>,
"Felix Kuehling" <felix.kuehling@amd.com>,
"Ralph Campbell" <rcampbell@nvidia.com>,
"John Hubbard" <jhubbard@nvidia.com>,
kvm@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-rdma@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls
Date: Fri, 7 Dec 2018 04:35:52 +0800 [thread overview]
Message-ID: <201812070404.fxW8tSrk%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181203201817.10759-3-jglisse@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3674 bytes --]
Hi Jérôme,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc5]
[cannot apply to next-20181206]
[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/jglisse-redhat-com/mmu-notifier-contextual-informations/20181207-031930
config: i386-randconfig-x007-201848 (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=i386
All errors (new ones prefixed by >>):
kernel/events/uprobes.c: In function '__replace_page':
>> kernel/events/uprobes.c:174:28: error: storage size of 'range' isn't known
struct mmu_notifier_range range;
^~~~~
kernel/events/uprobes.c:174:28: warning: unused variable 'range' [-Wunused-variable]
vim +174 kernel/events/uprobes.c
152
153 /**
154 * __replace_page - replace page in vma by new page.
155 * based on replace_page in mm/ksm.c
156 *
157 * @vma: vma that holds the pte pointing to page
158 * @addr: address the old @page is mapped at
159 * @page: the cowed page we are replacing by kpage
160 * @kpage: the modified page we replace page by
161 *
162 * Returns 0 on success, -EFAULT on failure.
163 */
164 static int __replace_page(struct vm_area_struct *vma, unsigned long addr,
165 struct page *old_page, struct page *new_page)
166 {
167 struct mm_struct *mm = vma->vm_mm;
168 struct page_vma_mapped_walk pvmw = {
169 .page = old_page,
170 .vma = vma,
171 .address = addr,
172 };
173 int err;
> 174 struct mmu_notifier_range range;
175 struct mem_cgroup *memcg;
176
177 range.start = addr;
178 range.end = addr + PAGE_SIZE;
179 range.mm = mm;
180
181 VM_BUG_ON_PAGE(PageTransHuge(old_page), old_page);
182
183 err = mem_cgroup_try_charge(new_page, vma->vm_mm, GFP_KERNEL, &memcg,
184 false);
185 if (err)
186 return err;
187
188 /* For try_to_free_swap() and munlock_vma_page() below */
189 lock_page(old_page);
190
191 mmu_notifier_invalidate_range_start(&range);
192 err = -EAGAIN;
193 if (!page_vma_mapped_walk(&pvmw)) {
194 mem_cgroup_cancel_charge(new_page, memcg, false);
195 goto unlock;
196 }
197 VM_BUG_ON_PAGE(addr != pvmw.address, old_page);
198
199 get_page(new_page);
200 page_add_new_anon_rmap(new_page, vma, addr, false);
201 mem_cgroup_commit_charge(new_page, memcg, false, false);
202 lru_cache_add_active_or_unevictable(new_page, vma);
203
204 if (!PageAnon(old_page)) {
205 dec_mm_counter(mm, mm_counter_file(old_page));
206 inc_mm_counter(mm, MM_ANONPAGES);
207 }
208
209 flush_cache_page(vma, addr, pte_pfn(*pvmw.pte));
210 ptep_clear_flush_notify(vma, addr, pvmw.pte);
211 set_pte_at_notify(mm, addr, pvmw.pte,
212 mk_pte(new_page, vma->vm_page_prot));
213
214 page_remove_rmap(old_page, false);
215 if (!page_mapped(old_page))
216 try_to_free_swap(old_page);
217 page_vma_mapped_walk_done(&pvmw);
218
219 if (vma->vm_flags & VM_LOCKED)
220 munlock_vma_page(old_page);
221 put_page(old_page);
222
223 err = 0;
224 unlock:
225 mmu_notifier_invalidate_range_end(&range);
226 unlock_page(old_page);
227 return err;
228 }
229
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23952 bytes --]
next prev parent reply other threads:[~2018-12-06 20:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 20:18 [PATCH 0/3] mmu notifier contextual informations jglisse
2018-12-03 20:18 ` [PATCH 1/3] mm/mmu_notifier: use structure for invalidate_range_start/end callback jglisse
2018-12-03 20:18 ` [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls jglisse
2018-12-04 0:09 ` Jerome Glisse
2018-12-05 11:04 ` Jan Kara
2018-12-05 15:53 ` Jerome Glisse
2018-12-05 16:28 ` Jan Kara
2018-12-06 20:31 ` kbuild test robot
2018-12-06 20:35 ` kbuild test robot [this message]
2018-12-03 20:18 ` [PATCH 3/3] mm/mmu_notifier: contextual information for event triggering invalidation jglisse
2018-12-04 8:17 ` Mike Rapoport
2018-12-04 14:48 ` Jerome Glisse
2018-12-04 23:21 ` Andrew Morton
2018-12-06 20:53 ` kbuild test robot
2018-12-06 21:19 ` kbuild test robot
2018-12-06 21:51 ` Jerome Glisse
2018-12-04 7:35 ` [PATCH 0/3] mmu notifier contextual informations Koenig, Christian
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=201812070404.fxW8tSrk%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=christian.koenig@amd.com \
--cc=dan.j.williams@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=felix.kuehling@amd.com \
--cc=jack@suse.cz \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=kbuild-all@01.org \
--cc=kvm@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mawilcox@microsoft.com \
--cc=mhocko@kernel.org \
--cc=pbonzini@redhat.com \
--cc=rcampbell@nvidia.com \
--cc=rkrcmar@redhat.com \
--cc=zwisler@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).