Re: [PATCH 0/8][for -mm] mem_notify v6

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: KOSAKI Motohiro <kosaki.motohiro@...>
Cc: <linux-mm@...>, <linux-kernel@...>
Date: Monday, April 21, 2008 - 4:32 pm

On Fri, Apr 18, 2008 at 3:07 AM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:


Using mlock does enable the program to respond faster (and/or the
kernel doesn't have to find memory to fault the page in) and solves
the problem for this simple test program.  I think we're thinking of
the solution in two different ways: you want the program to react more
quickly or be "nicer", and I want the kernel to give notification
early enough to allow time for things that can (and do) happen when
things aren't so nice. I realize that in extreme circumstances oom may
be unavoidable, but a threshold-based notification, in addition to the
current /dev/mem_notify mechanism, would help avoid extreme
circumstances.  I'm going to look into doing this.


This should be fine; I intentionally do the open/read/write/close
after freeing memory.


I made your changes to my program (I'm using clone since I don't have
a pthreads library on my device, and I left PAGESIZE at 4K instead of
64K), and having memory locked does avoid oom in this case, but
unfortunately I don't think it's a general solution that will work
everywhere in my system.  (Although I'm going to try it.)

Thanks,
.tom
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Sat Feb 9, 11:19 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Tom May, (Tue Apr 1, 7:35 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Wed Apr 2, 3:31 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Tom May, (Mon Apr 14, 8:16 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Thu Apr 17, 5:30 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Tom May, (Thu Apr 17, 3:23 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Daniel Spång, (Wed Apr 23, 4:27 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Tom May, (Wed Apr 30, 10:07 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Thu May 1, 11:06 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Tom May, (Fri May 2, 6:21 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Sat May 3, 8:26 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Tom May, (Tue May 6, 1:22 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Fri Apr 18, 6:07 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Tom May, (Mon Apr 21, 4:32 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Tue Apr 15, 10:30 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Tom May, (Wed Apr 2, 1:45 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Paul Jackson, (Sun Feb 17, 10:49 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Tue Feb 19, 3:36 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Paul Jackson, (Tue Feb 19, 11:00 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Pavel Machek, (Tue Feb 19, 6:28 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Rik van Riel, (Tue Feb 19, 10:07 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Paul Jackson, (Wed Feb 20, 12:36 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Tue Feb 19, 10:48 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Paul Jackson, (Wed Feb 20, 12:57 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Wed Feb 20, 1:21 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Paul Jackson, (Tue Feb 19, 9:54 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Rik van Riel, (Tue Feb 19, 3:02 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Paul Jackson, (Tue Feb 19, 4:18 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Paul Jackson, (Tue Feb 19, 4:43 pm)
[PATCH 0/8][for -mm] mem_notify v6, Jonathan Corbet, (Mon Feb 11, 11:36 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Mon Feb 11, 11:46 am)
Re: [PATCH 0/8][for -mm] mem_notify v6, Jon Masters, (Sat Feb 9, 12:02 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Sat Feb 9, 12:33 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, Rik van Riel, (Sat Feb 9, 12:43 pm)
Re: [PATCH 0/8][for -mm] mem_notify v6, KOSAKI Motohiro, (Sat Feb 9, 12:49 pm)