lkml.org 
[lkml]   [2023]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 4/4] mm/rmap: implement anonmap allocate post callback for page_owner
On Thu, Nov 09, 2023 at 11:25:21AM +0800, Jeff Xie wrote:
> +static int anon_alloc_post_page_owner(struct folio *folio, struct task_struct *tsk,
> + void *data, char *kbuf, size_t count)
> +{
> + int ret;
> + unsigned long address = (unsigned long)data;
> +
> + ret = scnprintf(kbuf, count, "ANON_PAGE address 0x%lx\n", address);

... completely ignoring that it might have been mremap() since ...

I'm not an expert on anon memory. I'm sure someone can tell you how to
figure out the current address that a folio is mapped at.

\
 
 \ /
  Last update: 2023-11-20 13:54    [W:0.240 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site