lkml.org 
[lkml]   [2022]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v2 2/9] mm: pgtable: Add sysctl to enable COW PTE
On Tue, Sep 27, 2022 at 02:22:27PM -0700, John Hubbard wrote:
> > +extern int sysctl_cow_pte_pid;
>
> So are setting a global value, to a single pid?? Only one pid at a time
> can be set up?
>
> I think that tells you already that there is a huge API problem here.
>
> As the other thread with Nadav said, this is not a sysctl. It wants to
> be a prctl(), at least the way things look so far.

I will change it to use the prctl().
Probably it will be under PR_SET_MM or create a new option.

> > +static void set_cow_pte_task(void)
> > +{
> > + struct pid *pid;
> > + struct task_struct *task;
> > +
> > + pid = find_get_pid(sysctl_cow_pte_pid);
>
> This seems to be missing a corresponding call to put_pid().

Thanks.

> thanks,
>
> --
> John Hubbard
> NVIDIA
>

Best regards,
Chih-En Lin

\
 
 \ /
  Last update: 2022-09-28 10:39    [W:1.152 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site