From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: akpm@linux-foundation.org, broonie@kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linux-next@vger.kernel.org, mhocko@suse.cz,
mm-commits@vger.kernel.org, Mike Rapoport <rppt@kernel.org>
Subject: Re: mmotm 2020-11-16-16-47 uploaded (m/secretmem.c)
Date: Tue, 17 Nov 2020 15:29:36 +1100 [thread overview]
Message-ID: <20201117152936.4bad2b74@canb.auug.org.au> (raw)
In-Reply-To: <e7cc79ce-2448-98bc-6ae9-306f6991986f@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]
Hi all,
On Mon, 16 Nov 2020 20:20:12 -0800 Randy Dunlap <rdunlap@infradead.org> wrote:
>
> on x86_64:
>
> as reported on 2020-11-12:
>
> when CONFIG_MEMCG is not set:
>
> ../mm/secretmem.c: In function ‘secretmem_memcg_charge’:
> ../mm/secretmem.c:72:4: error: ‘struct page’ has no member named ‘memcg_data’
> p->memcg_data = page->memcg_data;
> ^~
> ../mm/secretmem.c:72:23: error: ‘struct page’ has no member named ‘memcg_data’
> p->memcg_data = page->memcg_data;
> ^~
> ../mm/secretmem.c: In function ‘secretmem_memcg_uncharge’:
> ../mm/secretmem.c:86:4: error: ‘struct page’ has no member named ‘memcg_data’
> p->memcg_data = 0;
> ^~
(As I said earlier today,) I will apply the following to linux-next today:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 16 Nov 2020 16:55:10 +1100
Subject: [PATCH] secretmem-add-memcg-accounting-fix2
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
mm/secretmem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mm/secretmem.c b/mm/secretmem.c
index 5ed6b2070136..c7a37b2d01ed 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -59,6 +59,7 @@ bool secretmem_active(void)
static int secretmem_memcg_charge(struct page *page, gfp_t gfp, int order)
{
+#ifdef CONFIG_MEMCG
unsigned long nr_pages = (1 << order);
int i, err;
@@ -72,11 +73,13 @@ static int secretmem_memcg_charge(struct page *page, gfp_t gfp, int order)
p->memcg_data = page->memcg_data;
}
+#endif
return 0;
}
static void secretmem_memcg_uncharge(struct page *page, int order)
{
+#ifdef CONFIG_MEMCG
unsigned long nr_pages = (1 << order);
int i;
@@ -87,6 +90,7 @@ static void secretmem_memcg_uncharge(struct page *page, int order)
}
memcg_kmem_uncharge_page(page, PMD_PAGE_ORDER);
+#endif
}
static int secretmem_pool_increase(struct secretmem_ctx *ctx, gfp_t gfp)
--
2.29.2
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2020-11-17 4:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-17 0:48 mmotm 2020-11-16-16-47 uploaded akpm
2020-11-17 4:20 ` mmotm 2020-11-16-16-47 uploaded (m/secretmem.c) Randy Dunlap
2020-11-17 4:29 ` Stephen Rothwell [this message]
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=20201117152936.4bad2b74@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=mm-commits@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=rppt@kernel.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).