login
Header Space

 
 

Re: [PATCH] more ZERO_PAGE handling in follow_page()

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>, <linux-mm@...>, <nickpiggin@...>, <tonyb@...>, <mika.penttila@...>
Date: Wednesday, May 7, 2008 - 8:40 pm

On Wed, 7 May 2008 14:25:39 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

I don't think this is a fix for serious trouble just a improvement.
But not sure on small systems....

a consideration.
== at coredump before patch
  killed by something
     -> generate core dump
           -> allocate "a" page before starting I/O even if a page is empty
                 -> do I/O
A page which is not mapped but there is page tables will be written out.
Here, newly allocated page is mapped_and_used after I/O. So, when we
reclaim this page, we need swap. This means terrible slow down or we cannot
go ahead when we exhaust swap.

A user can avoid this kind ot situation by setting rlimit. (and RLIMIT_CORE
is 0 at default.) or set overcommit memory or set dirty_ratio to very small.
But one terrible thing which I can think of is  that a process in coredump
cannot be killed. So once this happens, a user have to be patient or reboot
system.

It seems this patch can help coredump in following system 
  - swapless or An application which can generate core has some amount of
    ANON memory and it is multi-threaded. (pthread's stack is typical case
    for this memory usage.)
  - RLIMIT_CORE is RLIMIT_INIFINITY
  - core_pattern is file.
  - Don't have enough memory to do buffer I/O at coredump.
  - dirty_ratio is default.

But an application on this kind of system tends to be well controlled.

Ok, I'll check and update this against the newest git tree.
(But may took some hours.)

Thanks,
-Kame

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] more ZERO_PAGE handling in follow_page(), KAMEZAWA Hiroyuki, (Wed May 7, 3:36 am)
Re: [PATCH] more ZERO_PAGE handling in follow_page(), Andrew Morton, (Wed May 7, 5:25 pm)
Re: [PATCH] more ZERO_PAGE handling in follow_page(), KAMEZAWA Hiroyuki, (Wed May 7, 8:40 pm)
[PATCH] more ZERO_PAGE handling in follow_page() v2, KAMEZAWA Hiroyuki, (Thu May 8, 5:56 am)
speck-geostationary