Re: User space out of memory approach

2005-01-28 Thread Andrea Arcangeli
On Fri, Jan 28, 2005 at 11:21:11AM -0400, Mauricio Lin wrote: > As you know, Andrew generated the patch. Here goes some test results > about your OOM Killer and the Original OOm Killer. We accomplished 10 > experiments for each OOM Killer and below are average values. > > "Invocations" is the numb

Re: User space out of memory approach

2005-01-28 Thread Mauricio Lin
Hi Andrea, On Fri, 28 Jan 2005 09:58:24 -0400, Mauricio Lin <[EMAIL PROTECTED]> wrote: > Hi Andrea, > > On Thu, 27 Jan 2005 23:11:29 +0100, Andrea Arcangeli <[EMAIL PROTECTED]> > wrote: > > On Thu, Jan 27, 2005 at 02:54:13PM -0400, Mauricio Lin wrote: > > > Hi Andrea, > > > > > > On Wed, 26 Jan

Re: User space out of memory approach

2005-01-28 Thread Mauricio Lin
Hi Andrea, On Thu, 27 Jan 2005 23:11:29 +0100, Andrea Arcangeli <[EMAIL PROTECTED]> wrote: > On Thu, Jan 27, 2005 at 02:54:13PM -0400, Mauricio Lin wrote: > > Hi Andrea, > > > > On Wed, 26 Jan 2005 01:49:01 +0100, Andrea Arcangeli <[EMAIL PROTECTED]> > > wrote: > > > On Tue, Jan 25, 2005 at 08:11

Re: User space out of memory approach

2005-01-27 Thread Andrew Morton
Andrea Arcangeli <[EMAIL PROTECTED]> wrote: > > And they had not necessairly hardware access. They "might" have hardware > access. On x86 we could perhaps test for non-nullness of tsk->thread->io_bitmap_ptr? > I thought I could wait the other patches > to be merged to avoid confusion before makin

Re: User space out of memory approach

2005-01-27 Thread Andrea Arcangeli
On Thu, Jan 27, 2005 at 03:35:35PM -0800, Andrew Morton wrote: > On x86 we could perhaps test for non-nullness of tsk->thread->io_bitmap_ptr? yes for ioports. But I'm afraid I was too optimistic about eflags for iopl, that's not in the per-task tss, it's only stored at the very top of the kernel s

Re: User space out of memory approach

2005-01-27 Thread Andrea Arcangeli
On Thu, Jan 27, 2005 at 02:29:43PM -0800, Andrew Morton wrote: > I've already queued a patch for this: > > --- 25/mm/oom_kill.c~mm-fix-several-oom-killer-bugs-fix Thu Jan 27 > 13:56:58 2005 > +++ 25-akpm/mm/oom_kill.c Thu Jan 27 13:57:19 2005 > @@ -198,12 +198,7 @@ static void __oom_kil

Re: User space out of memory approach

2005-01-27 Thread Andrew Morton
Andrea Arcangeli <[EMAIL PROTECTED]> wrote: > > > > Can you replace this: > > > > > > if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO)) { > > > force_sig(SIGTERM, p); > > > } else { > > > force_sig(SIGKILL, p); > > > } > > > > > > wi

Re: User space out of memory approach

2005-01-27 Thread Andrea Arcangeli
On Thu, Jan 27, 2005 at 02:54:13PM -0400, Mauricio Lin wrote: > Hi Andrea, > > On Wed, 26 Jan 2005 01:49:01 +0100, Andrea Arcangeli <[EMAIL PROTECTED]> > wrote: > > On Tue, Jan 25, 2005 at 08:11:19PM -0400, Mauricio Lin wrote: > > > Sometimes the first application to be killed is XFree. AFAIK the

Re: User space out of memory approach

2005-01-27 Thread Mauricio Lin
Hi Andrea, On Wed, 26 Jan 2005 01:49:01 +0100, Andrea Arcangeli <[EMAIL PROTECTED]> wrote: > On Tue, Jan 25, 2005 at 08:11:19PM -0400, Mauricio Lin wrote: > > Sometimes the first application to be killed is XFree. AFAIK the > > This makes more sense now. You need somebody trapping sigterm in orde

Re: User space out of memory approach

2005-01-26 Thread Mauricio Lin
Hi Andrea, On Wed, 26 Jan 2005 01:49:01 +0100, Andrea Arcangeli <[EMAIL PROTECTED]> wrote: > On Tue, Jan 25, 2005 at 08:11:19PM -0400, Mauricio Lin wrote: > > Sometimes the first application to be killed is XFree. AFAIK the > > This makes more sense now. You need somebody trapping sigterm in orde

Re: User space out of memory approach

2005-01-25 Thread Thomas Gleixner
On Tue, 2005-01-25 at 20:11 -0400, Mauricio Lin wrote: > > Can you please show the kernel messages ? > > OK. We will try to reach a situation that the printk messages can be > written entirely in the log file and show you the kernel messages. But > as I said: usually the printks messages are not w

Re: User space out of memory approach

2005-01-25 Thread Andrea Arcangeli
On Tue, Jan 25, 2005 at 08:11:19PM -0400, Mauricio Lin wrote: > Sometimes the first application to be killed is XFree. AFAIK the This makes more sense now. You need somebody trapping sigterm in order to lockup and X sure traps it to recover the text console. Can you replace this: if (cap

Re: User space out of memory approach

2005-01-25 Thread Mauricio Lin
Hi Thomaz, On Tue, 25 Jan 2005 22:39:39 +0100, Thomas Gleixner <[EMAIL PROTECTED]> wrote: > On Tue, 2005-01-25 at 17:13 -0400, Mauricio Lin wrote: > > Hi Andrea, > > > > Your OOM Killer patch was tested and a strange behaviour was found. > > Basically as normal user we started some applications as

Re: User space out of memory approach

2005-01-25 Thread Thomas Gleixner
On Tue, 2005-01-25 at 17:13 -0400, Mauricio Lin wrote: > Hi Andrea, > > Your OOM Killer patch was tested and a strange behaviour was found. > Basically as normal user we started some applications as openoffice, > mozilla and emacs. > And as a root (in another tty) we started a simple program that

Re: User space out of memory approach

2005-01-25 Thread Mauricio Lin
Hi Andrea, Your OOM Killer patch was tested and a strange behaviour was found. Basically as normal user we started some applications as openoffice, mozilla and emacs. And as a root (in another tty) we started a simple program that uses malloc in a forever loop as below: int main (void) { int *

Re: User space out of memory approach

2005-01-21 Thread Andrea Arcangeli
On Fri, Jan 21, 2005 at 05:45:13PM -0400, Mauricio Lin wrote: > Hi Andrew, > > I have another question. You included an oom_adj entry in /proc for > each process. This was the approach you used in order to allow someone > or something to interfere the ranking algorithm from userland, right? > So i

Re: User space out of memory approach

2005-01-21 Thread Andrea Arcangeli
On Fri, Jan 21, 2005 at 05:27:11PM -0400, Mauricio Lin wrote: > Hi Andrea, > > I applied your patch and I am checking your code. It is really a very > interesting work. I have a question about the function > __set_current_state(TASK_INTERRUPTIBLE) you put in out_of_memory > function. Do not you th

Re: User space out of memory approach

2005-01-21 Thread Mauricio Lin
Hi Andrew, I have another question. You included an oom_adj entry in /proc for each process. This was the approach you used in order to allow someone or something to interfere the ranking algorithm from userland, right? So if i have an another ranking algorithm in user space, I can use it to compl

Re: User space out of memory approach

2005-01-21 Thread Mauricio Lin
Hi Andrea, I applied your patch and I am checking your code. It is really a very interesting work. I have a question about the function __set_current_state(TASK_INTERRUPTIBLE) you put in out_of_memory function. Do not you think it would be better put set_current_state instead of __set_current_stat

Re: User space out of memory approach

2005-01-19 Thread Bodo Eggert
On Thu, 20 Jan 2005, Edjard Souza Mota wrote: > > > > What about creating a linked list of (stackable) algorhithms which can > > > > be > > > > extended by loading modules and resorted using {proc,sys}fs? It will > > > > avoid > > > > the extra process, the extra CPU time (and task switches) to

Re: User space out of memory approach

2005-01-19 Thread Edjard Souza Mota
> > > If my system needs the OOM killer, it's usurally unresponsive to most > > > userspace applications. A normal daemon would be swapped out before the > > > runaway dhcpd grows larger than the web cache. It would have to be a > > > mlocked > > > RT task started from early userspace. It would be

Re: User space out of memory approach

2005-01-18 Thread Bodo Eggert
On Tue, 18 Jan 2005, Edjard Souza Mota wrote: > > If my system needs the OOM killer, it's usurally unresponsive to most > > userspace applications. A normal daemon would be swapped out before the > > runaway dhcpd grows larger than the web cache. It would have to be a mlocked > > RT task started f

Re: User space out of memory approach

2005-01-18 Thread Edjard Souza Mota
Hi, > If my system needs the OOM killer, it's usurally unresponsive to most > userspace applications. A normal daemon would be swapped out before the > runaway dhcpd grows larger than the web cache. It would have to be a mlocked > RT task started from early userspace. It would be difficult to set

Re: User space out of memory approach

2005-01-17 Thread Thomas Gleixner
On Sun, 2005-01-16 at 21:10 +, Alan Cox wrote: > On Sul, 2005-01-16 at 10:06, Edjard Souza Mota wrote: > > What do you think about the point we are trying to make, i.e., moving the > > ranking of PIDs to be killed to user space? Or, making user have some > > influence > > on it? We were misund

Re: User space out of memory approach

2005-01-16 Thread Alan Cox
On Sul, 2005-01-16 at 10:06, Edjard Souza Mota wrote: > What do you think about the point we are trying to make, i.e., moving the > ranking of PIDs to be killed to user space? Or, making user have some > influence > on it? We were misunderstood because the patch we sent was to make "a slight" > or

Re: User space out of memory approach

2005-01-16 Thread Bodo Eggert
Edjard Souza Mota wrote: > What do you think about the point we are trying to make, i.e., moving the > ranking of PIDs to be killed to user space? If my system needs the OOM killer, it's usurally unresponsive to most userspace applications. A normal daemon would be swapped out before the runaway

Re: User space out of memory approach

2005-01-16 Thread Edjard Souza Mota
Hi, Thanks Alan... > > well looking into Alan's email again I think I answered thinking on > > the wrong side :-) that the suggestion was to switch off OOM > > altogether and be done with all the discussion... tsk tsk tsk too > > defensive and hasty I guess :-) > > Thats what mode 2 is all about