On Tue, 3 Jun 2025 10:54:49 -0700
Linus Torvalds <torva...@linux-foundation.org> wrote:

> On Tue, 3 Jun 2025 at 10:26, Steven Rostedt <rost...@goodmis.org> wrote:
> >
> >  config DRM_TTM
> >         tristate
> > -       depends on DRM && MMU
> > +       depends on DRM && MMU && SHMEM  
> 
> Yeah, except I think you should just make it be
> 
>           depends on DRM && SHMEM
> 
> because SHMEM already depends on MMU.

Yeah, if I had made this a real patch I would have done that, but this was
only for seeing it it would work.

> 
> That said, our docs already say that if you disable SHMEM, it gets
> replaced by RAMFS, so maybe just having a ramfs version is the
> RightThing(tm).
> 
> I don't think such a ramfs version should just return 0 - much less an
> error. I think it should always redirty the page.
> 
> IOW, I think the "ramfs" version should look something like
> 
>         folio_mark_dirty(folio);
>         if (wbc->for_reclaim)
>                 return AOP_WRITEPAGE_ACTIVATE;  /* Return with folio locked */
>         folio_unlock(folio);
>         return 0;
> 
> which is what shmem does for the "page is locked" case.

I'll let someone that understand the code a bit more than I do to make such
a change. My patch was just a "this makes my system build" thing and let
those that know this code do the RightThing(tm).

-- Steve

Reply via email to