Regression on linux-next (next-20240228)

Borah, Chaitanya Kumar chaitanya.kumar.borah at intel.com
Tue Mar 5 06:49:16 UTC 2024


Hello Mathew,

> -----Original Message-----
> From: Borah, Chaitanya Kumar
> Sent: Monday, March 4, 2024 8:18 PM
> To: Matthew Wilcox <willy at infradead.org>
> Cc: intel-gfx at lists.freedesktop.org; Kurmi, Suresh Kumar
> <Suresh.Kumar.Kurmi at intel.com>; Saarinen, Jani <jani.saarinen at intel.com>
> Subject: RE: Regression on linux-next (next-20240228)
> 
> Hello Mathew,
> 
> > -----Original Message-----
> > From: Matthew Wilcox <willy at infradead.org>
> > Sent: Monday, March 4, 2024 6:52 PM
> > To: Borah, Chaitanya Kumar <chaitanya.kumar.borah at intel.com>
> > Cc: intel-gfx at lists.freedesktop.org; Kurmi, Suresh Kumar
> > <suresh.kumar.kurmi at intel.com>; Saarinen, Jani
> > <jani.saarinen at intel.com>
> > Subject: Re: Regression on linux-next (next-20240228)
> >
> > On Mon, Mar 04, 2024 at 10:03:13AM +0000, Borah, Chaitanya Kumar
> > wrote:
> > > > Could you try putting the two:
> > > >
> > > > -                       list_del(&folio->lru);
> > > >
> > > > statements back in and see if that fixes it?
> > >
> > > That seems to fix it.
> > >
> > >                 if (!folio_put_testzero(folio))
> > > +                       list_del(&folio->lru);
> > >                         continue;
> >
> > Ummm ... did you put { and } around this?  Otherwise the indentation
> > is misleading and what you're actually done is:
> >
> > 		if (!folio_put_testzero(folio))
> > 			list_del(&folio->lru);
> > 		continue;
> >
> > which will simply leak memory.
> >
> 
> Oops look like a miss on our side. Let us re-do this and get back to you.
> 

Issue is still seen with the following changes

void put_pages_list(struct list_head *pages)
 
        folio_batch_init(&fbatch);
        list_for_each_entry(folio, pages, lru) {
-               if (!folio_put_testzero(folio))
+               if (!folio_put_testzero(folio)) {
+                       list_del(&folio->lru);
                        continue;
+               }
                if (folio_test_large(folio)) {
                        __folio_put_large(folio);
+                       list_del(&folio->lru);
                        continue;
                }

Regards

Chaitanya

> Regards
> 
> Chaitanya
> 
> > >                 if (folio_test_large(folio)) {
> > >                         __folio_put_large(folio);
> > > +                       list_del(&folio->lru);
> > >                         continue;
> > >                 }
> > > Regards
> > >
> > > Chaitanya


More information about the Intel-gfx mailing list