On Wed, Mar 05, 2025 at 06:11:24PM +0000, Matthew Wilcox wrote: > On Wed, Mar 05, 2025 at 12:43:02PM +0100, Hannes Reinecke wrote: > > Oh, sure. But what annoys me: why do we have to care? > > > > When doing I/O _all_ data is stuffed into bvecs via > > bio_add_page(), and after that information about the > > origin is lost; any iteration on the bio will be a bvec > > iteration. > > Previously we could just do a bvec iteration, get a reference > > for each page, and start processing. > > Now suddenly the caller has to check if it's a slab page and don't > > get a reference for that. Not only that, he also has to remember > > to _not_ drop the reference when he's done. > > And, of course, tracing get_page() and the corresponding put_page() > > calls through all the layers. > > Networking needs to follow block's lead and STOP GETTING REFCOUNTS ON > PAGES. That will speed up networking (eliminates two atomic operations per > page). And of course, it will eliminate this hack in the MM. I think > we do need to put this hack into the MM for now, but it needs to go away > again as quickly as possible. > > What worries me is that nobody in networking has replied to this thread > yet. Do they not care? Let's see if a subject line change will help > with that. Since it triggered a kernel crash, I am pretty sure people care. How about sending out a patch to get more attentions? I am not sure what patterns here you are suggesting to change w.r.t page refcount, but at least using AI copilot or whatever automation tool should be very handy. Thanks.