From: Glauber Costa <glommer@parallels.com>
To: Greg Thelen <gthelen@google.com>
Cc: Glauber Costa <glommer@openvz.org>,
linux-mm@kvack.org, cgroups@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Dave Chinner <david@fromorbit.com>,
Anton Vorontsov <anton.vorontsov@linaro.org>,
John Stultz <john.stultz@linaro.org>,
Joonsoo Kim <js1304@gmail.com>, Michal Hocko <mhocko@suse.cz>,
Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH 1/2] vmpressure: in-kernel notifications
Date: Thu, 25 Apr 2013 14:50:27 +0400 [thread overview]
Message-ID: <51790A73.3030805@parallels.com> (raw)
In-Reply-To: <xr937gjrhg1f.fsf@gthelen.mtv.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
On 04/24/2013 11:42 PM, Greg Thelen wrote:
>> + vmpr->notify_userspace = true;
> Should notify_userspace get cleared sometime? Seems like we might need
> to clear or decrement notify_userspace in vmpressure_event() when
> calling eventfd_signal().
>
I am folding the attached patch and keeping the acks unless the ackers
oppose.
Greg, any other problem you spot here? Thanks for the review BTW.
[-- Attachment #2: vmpressure.diff --]
[-- Type: text/x-patch, Size: 789 bytes --]
diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index 1a082a0..e16256e 100644
--- a/mm/vmpressure.c
+++ b/mm/vmpressure.c
@@ -164,6 +164,7 @@ static bool vmpressure_event(struct vmpressure *vmpr,
}
}
+ vmpr->notify_userspace = false;
mutex_unlock(&vmpr->events_lock);
return signalled;
@@ -249,8 +250,13 @@ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg,
mutex_lock(&vmpr->sr_lock);
vmpr->scanned += scanned;
vmpr->reclaimed += reclaimed;
- vmpr->notify_userspace = true;
scanned = vmpr->scanned;
+ /*
+ * If we didn't reach this point, only kernel events will be triggered.
+ * It is the job of the worker thread to clean this up once the
+ * notifications are all delivered.
+ */
+ vmpr->notify_userspace = true;
mutex_unlock(&vmpr->sr_lock);
schedule:
next prev parent reply other threads:[~2013-04-25 10:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 8:22 [PATCH 0/2] reuse vmpressure for in-kernel events Glauber Costa
2013-04-23 8:22 ` [PATCH 1/2] vmpressure: in-kernel notifications Glauber Costa
2013-04-23 17:11 ` Anton Vorontsov
2013-04-23 18:17 ` Glauber Costa
2013-04-23 19:13 ` Pekka Enberg
2013-04-23 20:24 ` Anton Vorontsov
2013-04-23 21:01 ` Anton Vorontsov
2013-04-24 6:26 ` Glauber Costa
2013-04-24 11:20 ` Glauber Costa
2013-04-24 7:21 ` Greg Thelen
2013-04-24 8:36 ` Glauber Costa
2013-04-24 19:35 ` Greg Thelen
2013-04-24 19:42 ` Greg Thelen
2013-04-24 20:04 ` Glauber Costa
2013-04-25 10:50 ` Glauber Costa [this message]
2013-04-25 18:34 ` Greg Thelen
2013-04-23 8:22 ` [PATCH 2/2] memcg: reap dead memcgs under pressure Glauber Costa
2013-04-25 12:50 ` Li Zefan
2013-04-26 7:38 ` Glauber Costa
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=51790A73.3030805@parallels.com \
--to=glommer@parallels.com \
--cc=akpm@linux-foundation.org \
--cc=anton.vorontsov@linaro.org \
--cc=cgroups@vger.kernel.org \
--cc=david@fromorbit.com \
--cc=glommer@openvz.org \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=john.stultz@linaro.org \
--cc=js1304@gmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
/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