[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DUB114-W42B5E1E3DE755AB075F263BFCC0@phx.gbl>
Date: Mon, 15 Apr 2013 00:44:47 +0000
From: Jose Navas <josenavasmolina@...mail.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Sleeping process from kernel space: not doing schedule?
Hi all,
First of all, I am not subscribed to the mailing list and I'd like to get the answers directly to my email. Thank you!
I am working on a project where I am trying to detect the Out Of Memory machine state and collect some data from the machine. I've created a LKM that hacks the do_brk call and checks if there is enough memory to perform the call. I successfully detect the OOM state and my next step is sending a signal to a process in user space that writes info to a log file (this way, I avoid the necessity of opening files in kernel space). After sending the signal, the LKM puts the current process to sleep, using the function schedule_timeout_uninterruptible(). What I expect, is to see the process in user space running some time while the process is sleeping, but, instead, I see that the user process do not run until the sleeping process has finished...
I'm suspecting that it is not doing scheduling or something similar. I'm missing something? Is this the correct way of putting a process to sleep from kernel space?
Thank you!!!
Jose --
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists