lkml.org 
[lkml]   [2020]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v22 07/18] mm/page_idle: Avoid interferences from concurrent users
Date
On Wed, 25 Nov 2020 07:30:27 -0800 Shakeel Butt <shakeelb@google.com> wrote:

> On Tue, Oct 20, 2020 at 2:06 AM SeongJae Park <sjpark@amazon.com> wrote:
> >
> > From: SeongJae Park <sjpark@amazon.de>
> >
> > Concurrent Idle Page Tracking users can interfere each other because the
> > interface doesn't provide a central rule for synchronization between the
> > users. Users could implement their own synchronization rule, but even
> > in that case, applications developed by different users would not know
> > how to synchronize with others. To help this situation, this commit
> > introduces a centralized synchronization infrastructure of Idle Page
> > Tracking.
> >
> > In detail, this commit introduces a mutex lock for Idle Page Tracking,
> > called 'page_idle_lock'. It is exposed to user space via a new bool
> > sysfs file, '/sys/kernel/mm/page_idle/lock'. By writing to and reading
> > from the file, users can hold/release and read status of the mutex.
> > Writes to the Idle Page Tracking 'bitmap' file fails if the lock is not
> > held, while reads of the file can be done regardless of the lock status.
> >
> > Note that users could still interfere each other if they abuse this
> > locking rule. Nevertheless, this change will let them notice the rule.
> >
> > Signed-off-by: SeongJae Park <sjpark@amazon.de>
>
> I don't think this is allowed. I mean returning to user space with
> held mutex and other processes can unlock it. I don't think mutex is
> what you need. Or more importantly is this really an issue?
>

In a separate call, I and Shakeel agreed on that this is trying to fix an issue
that aren't proved real. So I will drop this patch in next version of the
patchset. We can restore this patch or find better fix later if the problem
comes out in real.


Thanks,
SeongJae Park

\
 
 \ /
  Last update: 2020-11-26 14:39    [W:0.065 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site