Re: [PATCH v2 00/14] list: Prepare entry iterators to cache cursor state
Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/[email protected]> Tue, 9 Jun 2026 10:05:58 +0300
| Newsgroups | gmane.linux.ports.tegra,gmane.linux.kernel.drbd.devel,gmane.linux.block,gmane.linux.kernel.firewire.devel,gmane.comp.video.dri.devel,gmane.comp.freedesktop.xorg.drivers.intel,gmane.linux.kernel.spi.devel,gmane.linux.ports.arm.kernel,gmane.linux.sound,gmane.linux.kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Tue, Jun 09, 2026 at 09:47:34AM +0300, Andy Shevchenko wrote: > On Tue, Jun 09, 2026 at 02:13:33PM +0800, Kaitao Cheng wrote: > > > > This series prepares for, and then updates, the list_for_each_entry() > > family so the common entry iterators cache their next or previous cursor > > before the loop body runs. While code looks okay, this doesn't explain "why?" aspects. > > The first 13 patches open-code loops that intentionally depend on the > > old "derive the next entry from the current cursor at the end of the > > iteration" behaviour. These loops append work to the list being walked, > > restart traversal after dropping a lock, skip an entry consumed by the > > current iteration, or otherwise adjust the cursor in the loop body. > > > > The final patch changes include/linux/list.h to keep a private cursor in > > the common entry iterators while preserving the public macro interface. > > The safe variants remain available when callers need the temporary > > cursor explicitly or have stronger mutation requirements. > > Something is really wrong with the patch series email chaining. > Patches 3, 10, and 13 start the subthreads. Please, check your > tools and fix them accordingly. > > Note, `git format-patch ...` should not have this "side-effect" > when used correctly. -- With Best Regards, Andy Shevchenko