Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1259197
| From | "Hillf Danton" <hillf.zj@alibaba-inc.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 2/3] mm: throttle on IO only when there are too many dirty and writeback pages |
| Date | 2015-10-30 05:30 +0100 |
| Message-ID | <qp9ua-18V-3@gated-at.bofh.it> (permalink) |
| References | <qoX9D-1T9-7@gated-at.bofh.it> <qoX9E-1T9-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -3191,8 +3191,23 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
> */
> if (__zone_watermark_ok(zone, order, min_wmark_pages(zone),
> ac->high_zoneidx, alloc_flags, target)) {
> - /* Wait for some write requests to complete then retry */
> - wait_iff_congested(zone, BLK_RW_ASYNC, HZ/50);
> + unsigned long writeback = zone_page_state(zone, NR_WRITEBACK),
> + dirty = zone_page_state(zone, NR_FILE_DIRTY);
> +
> + if (did_some_progress)
> + goto retry;
> +
> + /*
> + * If we didn't make any progress and have a lot of
> + * dirty + writeback pages then we should wait for
> + * an IO to complete to slow down the reclaim and
> + * prevent from pre mature OOM
> + */
> + if (2*(writeback + dirty) > reclaimable)
> + congestion_wait(BLK_RW_ASYNC, HZ/10);
> + else
> + cond_resched();
> +
Looks the vmstat updater issue is not addressed.
> goto retry;
> }
> }
> --
> 2.6.1
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
RFC: OOM detection rework v1 mhocko@kernel.org - 2015-10-29 16:20 +0100
[RFC 3/3] mm: use watermak checks for __GFP_REPEAT high order allocations mhocko@kernel.org - 2015-10-29 16:20 +0100
[RFC 1/3] mm, oom: refactor oom detection mhocko@kernel.org - 2015-10-29 16:20 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2015-10-30 05:20 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection Michal Hocko <mhocko@kernel.org> - 2015-10-30 09:40 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection Michal Hocko <mhocko@kernel.org> - 2015-10-30 11:20 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2015-10-30 14:40 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection Michal Hocko <mhocko@kernel.org> - 2015-10-30 16:00 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2015-10-31 05:00 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> - 2015-10-30 06:30 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection Michal Hocko <mhocko@kernel.org> - 2015-10-30 09:30 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> - 2015-10-30 10:50 +0100
Re: [RFC 1/3] mm, oom: refactor oom detection Michal Hocko <mhocko@kernel.org> - 2015-10-30 11:20 +0100
[RFC 2/3] mm: throttle on IO only when there are too many dirty and writeback pages mhocko@kernel.org - 2015-10-29 16:20 +0100
Re: [RFC 2/3] mm: throttle on IO only when there are too many dirty and writeback pages "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2015-10-30 05:30 +0100
Re: [RFC 2/3] mm: throttle on IO only when there are too many dirty and writeback pages Michal Hocko <mhocko@kernel.org> - 2015-10-30 09:40 +0100
Re: [RFC 2/3] mm: throttle on IO only when there are too many dirty and writeback pages Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> - 2015-10-30 06:50 +0100
Re: [RFC 2/3] mm: throttle on IO only when there are too many dirty and writeback pages Michal Hocko <mhocko@kernel.org> - 2015-10-30 09:40 +0100
csiph-web