Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1227834 > unrolled thread
| Started by | Vladimir Davydov <vdavydov@parallels.com> |
|---|---|
| First post | 2015-09-18 14:50 +0200 |
| Last post | 2015-09-18 18:00 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH -mm] vmscan: fix sane_reclaim helper for legacy memcg Vladimir Davydov <vdavydov@parallels.com> - 2015-09-18 14:50 +0200
Re: [PATCH -mm] vmscan: fix sane_reclaim helper for legacy memcg Tejun Heo <tj@kernel.org> - 2015-09-18 15:40 +0200
Re: [PATCH -mm] vmscan: fix sane_reclaim helper for legacy memcg Michal Hocko <mhocko@kernel.org> - 2015-09-18 16:10 +0200
Re: [PATCH -mm] vmscan: fix sane_reclaim helper for legacy memcg Tejun Heo <tj@kernel.org> - 2015-09-18 18:00 +0200
| From | Vladimir Davydov <vdavydov@parallels.com> |
|---|---|
| Date | 2015-09-18 14:50 +0200 |
| Subject | [PATCH -mm] vmscan: fix sane_reclaim helper for legacy memcg |
| Message-ID | <qa3h0-2Sw-23@gated-at.bofh.it> |
The sane_reclaim() helper is supposed to return false for memcg reclaim
if the legacy hierarchy is used, because the latter lacks dirty
throttling mechanism, and so it did before it was accidentally broken by
commit 33398cf2f360c ("memcg: export struct mem_cgroup"). Fix it.
Fixes: 33398cf2f360c ("memcg: export struct mem_cgroup")
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
---
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index db5339dd4a32..dbc3b3ae48de 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -175,7 +175,7 @@ static bool sane_reclaim(struct scan_control *sc)
if (!memcg)
return true;
#ifdef CONFIG_CGROUP_WRITEBACK
- if (memcg->css.cgroup)
+ if (cgroup_on_dfl(memcg->css.cgroup))
return true;
#endif
return false;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2015-09-18 15:40 +0200 |
| Message-ID | <qa43o-41T-25@gated-at.bofh.it> |
| In reply to | #1227834 |
On Fri, Sep 18, 2015 at 03:48:00PM +0300, Vladimir Davydov wrote:
> The sane_reclaim() helper is supposed to return false for memcg reclaim
> if the legacy hierarchy is used, because the latter lacks dirty
> throttling mechanism, and so it did before it was accidentally broken by
> commit 33398cf2f360c ("memcg: export struct mem_cgroup"). Fix it.
>
> Fixes: 33398cf2f360c ("memcg: export struct mem_cgroup")
> Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Date | 2015-09-18 16:10 +0200 |
| Message-ID | <qa4wq-4P4-23@gated-at.bofh.it> |
| In reply to | #1227834 |
On Fri 18-09-15 15:48:00, Vladimir Davydov wrote:
> The sane_reclaim() helper is supposed to return false for memcg reclaim
> if the legacy hierarchy is used, because the latter lacks dirty
> throttling mechanism, and so it did before it was accidentally broken by
> commit 33398cf2f360c ("memcg: export struct mem_cgroup"). Fix it.
>
> Fixes: 33398cf2f360c ("memcg: export struct mem_cgroup")
> Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Thanks for catching this up!
> ---
> mm/vmscan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index db5339dd4a32..dbc3b3ae48de 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -175,7 +175,7 @@ static bool sane_reclaim(struct scan_control *sc)
> if (!memcg)
> return true;
> #ifdef CONFIG_CGROUP_WRITEBACK
> - if (memcg->css.cgroup)
> + if (cgroup_on_dfl(memcg->css.cgroup))
> return true;
> #endif
> return false;
> --
> 2.1.4
--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2015-09-18 18:00 +0200 |
| Message-ID | <qa6eT-75X-45@gated-at.bofh.it> |
| In reply to | #1227834 |
Hello,
On Fri, Sep 18, 2015 at 03:48:00PM +0300, Vladimir Davydov wrote:
> The sane_reclaim() helper is supposed to return false for memcg reclaim
> if the legacy hierarchy is used, because the latter lacks dirty
> throttling mechanism, and so it did before it was accidentally broken by
> commit 33398cf2f360c ("memcg: export struct mem_cgroup"). Fix it.
>
> Fixes: 33398cf2f360c ("memcg: export struct mem_cgroup")
> Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
> ---
> mm/vmscan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index db5339dd4a32..dbc3b3ae48de 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -175,7 +175,7 @@ static bool sane_reclaim(struct scan_control *sc)
> if (!memcg)
> return true;
> #ifdef CONFIG_CGROUP_WRITEBACK
> - if (memcg->css.cgroup)
> + if (cgroup_on_dfl(memcg->css.cgroup))
Just a heads-up. I'm applying a patch which replaces cgroup_on_dfl()
with cgroup_subsys_on_dfl() to cgroup/for-4.4, so this patch would
need to be adjusted to do cgroup_subsys_on_dfl(memory_cgrp_subsys)
instead.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web