From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>,
Hugh Dickins <hughd@google.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Christian Koenig <christian.koenig@amd.com>,
Huang Rui <ray.huang@amd.com>,
Matthew Auld <matthew.auld@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
dri-devel@lists.freedesktop.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Subject: Re: [PATCH] mm: Fix compile error when CONFIG_SHMEM is not set
Date: Tue, 3 Jun 2025 14:06:32 -0400 [thread overview]
Message-ID: <20250603140632.168190f9@gandalf.local.home> (raw)
In-Reply-To: <CAHk-=whb2rMUCGsaNQC4pkCikJ7iX2_Tc1ye5_a6R9-vAkd2Cg@mail.gmail.com>
On Tue, 3 Jun 2025 10:54:49 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Tue, 3 Jun 2025 at 10:26, Steven Rostedt <rostedt@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
next prev parent reply other threads:[~2025-06-03 18:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 21:05 [PATCH] mm: Fix compile error when CONFIG_SHMEM is not set Steven Rostedt
2025-06-02 21:14 ` Steven Rostedt
2025-06-02 21:46 ` Matthew Wilcox
2025-06-03 8:02 ` Hugh Dickins
2025-06-03 14:29 ` Steven Rostedt
2025-06-03 16:26 ` Matthew Wilcox
2025-06-03 17:27 ` Steven Rostedt
2025-06-03 17:54 ` Linus Torvalds
2025-06-03 18:06 ` Steven Rostedt [this message]
2025-06-04 7:03 ` Hugh Dickins
2025-06-04 12:04 ` Steven Rostedt
2025-06-04 12:18 ` Thomas Hellström
2025-06-04 12:23 ` Steven Rostedt
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=20250603140632.168190f9@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=ray.huang@amd.com \
--cc=simona@ffwll.ch \
--cc=torvalds@linux-foundation.org \
--cc=tzimmermann@suse.de \
--cc=willy@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).