From: kernel test robot <lkp@intel.com>
To: Zi Yan <ziy@nvidia.com>,
linux-mm@kvack.org,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: oe-kbuild-all@lists.linux.dev,
Ryan Roberts <ryan.roberts@arm.com>,
Hugh Dickins <hughd@google.com>,
David Hildenbrand <david@redhat.com>,
Yang Shi <yang@os.amperecomputing.com>,
Miaohe Lin <linmiaohe@huawei.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
Yu Zhao <yuzhao@google.com>, John Hubbard <jhubbard@nvidia.com>,
linux-kernel@vger.kernel.org, Zi Yan <ziy@nvidia.com>
Subject: Re: [PATCH v2 6/6] mm/truncate: use folio_split() for truncate operation.
Date: Sun, 3 Nov 2024 01:22:25 +0800 [thread overview]
Message-ID: <202411030124.ZWzXWxPU-lkp@intel.com> (raw)
In-Reply-To: <20241101150357.1752726-7-ziy@nvidia.com>
Hi Zi,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on next-20241101]
[cannot apply to linus/master v6.12-rc5]
[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/Zi-Yan/mm-huge_memory-add-two-new-yet-used-functions-for-folio_split/20241101-230623
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20241101150357.1752726-7-ziy%40nvidia.com
patch subject: [PATCH v2 6/6] mm/truncate: use folio_split() for truncate operation.
config: arc-tb10x_defconfig (https://download.01.org/0day-ci/archive/20241103/202411030124.ZWzXWxPU-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241103/202411030124.ZWzXWxPU-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411030124.ZWzXWxPU-lkp@intel.com/
All errors (new ones prefixed by >>):
mm/truncate.c: In function 'truncate_inode_partial_folio':
>> mm/truncate.c:214:13: error: implicit declaration of function 'split_folio_at'; did you mean 'split_folio'? [-Werror=implicit-function-declaration]
214 | if (split_folio_at(folio, folio_page(folio, in_folio_offset), NULL) == 0)
| ^~~~~~~~~~~~~~
| split_folio
cc1: some warnings being treated as errors
vim +214 mm/truncate.c
166
167 /*
168 * Handle partial folios. The folio may be entirely within the
169 * range if a split has raced with us. If not, we zero the part of the
170 * folio that's within the [start, end] range, and then split the folio if
171 * it's large. split_page_range() will discard pages which now lie beyond
172 * i_size, and we rely on the caller to discard pages which lie within a
173 * newly created hole.
174 *
175 * Returns false if splitting failed so the caller can avoid
176 * discarding the entire folio which is stubbornly unsplit.
177 */
178 bool truncate_inode_partial_folio(struct folio *folio, loff_t start, loff_t end)
179 {
180 loff_t pos = folio_pos(folio);
181 unsigned int offset, length;
182 long in_folio_offset;
183
184 if (pos < start)
185 offset = start - pos;
186 else
187 offset = 0;
188 length = folio_size(folio);
189 if (pos + length <= (u64)end)
190 length = length - offset;
191 else
192 length = end + 1 - pos - offset;
193
194 folio_wait_writeback(folio);
195 if (length == folio_size(folio)) {
196 truncate_inode_folio(folio->mapping, folio);
197 return true;
198 }
199
200 /*
201 * We may be zeroing pages we're about to discard, but it avoids
202 * doing a complex calculation here, and then doing the zeroing
203 * anyway if the page split fails.
204 */
205 if (!mapping_inaccessible(folio->mapping))
206 folio_zero_range(folio, offset, length);
207
208 if (folio_needs_release(folio))
209 folio_invalidate(folio, offset, length);
210 if (!folio_test_large(folio))
211 return true;
212
213 in_folio_offset = PAGE_ALIGN_DOWN(offset) / PAGE_SIZE;
> 214 if (split_folio_at(folio, folio_page(folio, in_folio_offset), NULL) == 0)
215 return true;
216 if (folio_test_dirty(folio))
217 return false;
218 truncate_inode_folio(folio->mapping, folio);
219 return true;
220 }
221
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-11-02 17:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 15:03 [PATCH v2 0/6] Buddy allocator like folio split Zi Yan
2024-11-01 15:03 ` [PATCH v2 1/6] mm/huge_memory: add two new (yet used) functions for folio_split() Zi Yan
2024-11-06 10:44 ` Kirill A . Shutemov
2024-11-06 22:06 ` Zi Yan
2024-11-07 14:01 ` Kirill A . Shutemov
2024-11-07 14:42 ` Zi Yan
2024-11-07 15:01 ` Zi Yan
2024-11-01 15:03 ` [PATCH v2 2/6] mm/huge_memory: move folio split common code to __folio_split() Zi Yan
2024-11-01 15:03 ` [PATCH v2 3/6] mm/huge_memory: add buddy allocator like folio_split() Zi Yan
2024-11-01 15:03 ` [PATCH v2 4/6] mm/huge_memory: remove the old, unused __split_huge_page() Zi Yan
2024-11-01 15:03 ` [PATCH v2 5/6] mm/huge_memory: add folio_split() to debugfs testing interface Zi Yan
2024-11-01 15:03 ` [PATCH v2 6/6] mm/truncate: use folio_split() for truncate operation Zi Yan
2024-11-02 15:39 ` kernel test robot
2024-11-02 17:22 ` kernel test robot [this message]
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=202411030124.ZWzXWxPU-lkp@intel.com \
--to=lkp@intel.com \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=jhubbard@nvidia.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ryan.roberts@arm.com \
--cc=wangkefeng.wang@huawei.com \
--cc=willy@infradead.org \
--cc=yang@os.amperecomputing.com \
--cc=yuzhao@google.com \
--cc=ziy@nvidia.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