Hi
> > I'd read mem_notify as "tell me when new memory is unplugged" or
> > something. /dev/oom_notify? Plus, /dev/ names usually do not have "_"
> > in them.
>
> I don't think we should use oom in the name, since the notification is
> sent long before oom.
OK, I don't change name.
Of cource, I
On 1/16/08, Pavel Machek <[EMAIL PROTECTED]> wrote:
> On Wed 2008-01-16 02:13:32, Marcelo Tosatti wrote:
> > On Wed, Jan 16, 2008 at 10:57:16AM +0900, KOSAKI Motohiro wrote:
> > > Hi Pavel
> > >
> > > > > err = poll(&pollfds, 1, -1); // wake up at low memory
> > > > >
> > > > > ...
On Wed 2008-01-16 02:13:32, Marcelo Tosatti wrote:
> On Wed, Jan 16, 2008 at 10:57:16AM +0900, KOSAKI Motohiro wrote:
> > Hi Pavel
> >
> > > > err = poll(&pollfds, 1, -1); // wake up at low memory
> > > >
> > > > ...
> > > >
> > >
> > > Nice, this is really needed for openmoko,
On Wed, Jan 16, 2008 at 10:57:16AM +0900, KOSAKI Motohiro wrote:
> Hi Pavel
>
> > > err = poll(&pollfds, 1, -1); // wake up at low memory
> > >
> > > ...
> > >
> >
> > Nice, this is really needed for openmoko, zaurus, etc
> >
> > But this changelog needs to go into Documentation/
Hi Alan
> > > It also appears there is no way to wait for memory shortages (processes
> > > that can free memory easily) only for memory to start appearing.
> >
> > poll() with never timeout don't fill your requirement?
> > to be honest, maybe I don't understand your afraid yet. sorry.
>
> My mi
Hi Pavel
> > err = poll(&pollfds, 1, -1); // wake up at low memory
> >
> > ...
> >
>
> Nice, this is really needed for openmoko, zaurus, etc
>
> But this changelog needs to go into Documentation/...
>
> ...and /dev/mem_notify is really a bad name. /dev/memory_low?
> /dev/oom?
Hi!
> the core of this patch series.
> add /dev/mem_notify device for notification low memory to user process.
>
>
>
> fd = open("/dev/mem_notify", O_RDONLY);
> if (fd < 0) {
> exit(1);
> }
> pollfds.fd = fd;
> pollfds.events = POLLIN;
>
> Tasks are added to the end of waitqueue->task_list through
> add_wait_queue_exclusive, and waken up from the start of the list. So
> I don't think that can happen (its FIFO).
Agreed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROT
> current wake up order is simply FIFO by poll(2) called.
> because the VM cannot know how much amount each process can do in free.
> the process rss and freeable memory is not proportional.
Ok this makes sense.
>
> thus I adopt wake up one after another until restoration memory shortage.
>
>
>
Hi Alan,
On Tue, Jan 15, 2008 at 11:20:27AM +, Alan Cox wrote:
> On Tue, 15 Jan 2008 19:59:02 +0900
> KOSAKI Motohiro <[EMAIL PROTECTED]> wrote:
>
> >
> > > > the core of this patch series.
> > > > add /dev/mem_notify device for notification low memory to user process.
> > >
> > > As you on
Hi Alan
thank you for kindfull explain.
> > > > the core of this patch series.
> > > > add /dev/mem_notify device for notification low memory to user process.
> > >
> > > As you only wake one process how would you use this API from processes
> > > which want to monitor and can free memory under
On Tue, 15 Jan 2008 19:59:02 +0900
KOSAKI Motohiro <[EMAIL PROTECTED]> wrote:
>
> > > the core of this patch series.
> > > add /dev/mem_notify device for notification low memory to user process.
> >
> > As you only wake one process how would you use this API from processes
> > which want to moni
> > the core of this patch series.
> > add /dev/mem_notify device for notification low memory to user process.
>
> As you only wake one process how would you use this API from processes
> which want to monitor and can free memory under load. Also what fairness
> guarantees are there...
Sorry, I
On Tue, 15 Jan 2008 10:01:21 +0900
KOSAKI Motohiro <[EMAIL PROTECTED]> wrote:
> the core of this patch series.
> add /dev/mem_notify device for notification low memory to user process.
As you only wake one process how would you use this API from processes
which want to monitor and can free memory
On Tue, 15 Jan 2008 11:20:56 +0900
KOSAKI Motohiro <[EMAIL PROTECTED]> wrote:
> Hi Kame
>
> > > + if (pressure) {
> > > + nr_wakeup = max_t(int, atomic_read(&nr_watcher_task)>>4, 100);
> > > + atomic_long_set(&last_mem_notify, jiffies);
> > > + wake_up_locked_nr(&mem_wait,
Hi Kame
> > + if (pressure) {
> > + nr_wakeup = max_t(int, atomic_read(&nr_watcher_task)>>4, 100);
> > + atomic_long_set(&last_mem_notify, jiffies);
> > + wake_up_locked_nr(&mem_wait, nr_wakeup);
> > + }
> What is this for ? and Why ?
> Are there too many waiters
On Tue, 15 Jan 2008 10:01:21 +0900
KOSAKI Motohiro <[EMAIL PROTECTED]> wrote:
> + if (pressure) {
> + nr_wakeup = max_t(int, atomic_read(&nr_watcher_task)>>4, 100);
> + atomic_long_set(&last_mem_notify, jiffies);
> + wake_up_locked_nr(&mem_wait, nr_wakeup);
Hi
> > 1/ I don't see the file below listed in the diffstat above...
>
> Agghh...
> sorry, it is mistake.
> I repost soon.
>
> thanks.
the below diffstat is correct.
thanks!
--
Documentation/devices.txt |1
drivers/char/mem.c |6 ++
include/linux/
Hi randy
> Hi,
>
> 1/ I don't see the file below listed in the diffstat above...
Agghh...
sorry, it is mistake.
I repost soon.
thanks.
> 2/ Where is the userspace interface information for the syscall?
No.
userspace interface is only poll(2).
--
To unsubscribe from this list: send the li
On Tue, 15 Jan 2008 10:01:21 +0900 KOSAKI Motohiro wrote:
> the core of this patch series.
> add /dev/mem_notify device for notification low memory to user process.
>
>
>
> fd = open("/dev/mem_notify", O_RDONLY);
> if (fd < 0) {
> exit(1);
> }
> p
the core of this patch series.
add /dev/mem_notify device for notification low memory to user process.
fd = open("/dev/mem_notify", O_RDONLY);
if (fd < 0) {
exit(1);
}
pollfds.fd = fd;
pollfds.events = POLLIN;
pollfds.revents = 0;
21 matches
Mail list logo