From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 3 Nov 2008 08:46:08 -0800 From: "Roman V. Shaposhnik" In-reply-to: <298b7f07cdca5b40775e874c8d21694a@quanstro.net> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-id: <1225730768.4781.14.camel@goose.sun.com> MIME-version: 1.0 Content-type: text/plain Content-transfer-encoding: 7BIT References: <298b7f07cdca5b40775e874c8d21694a@quanstro.net> Subject: Re: [9fans] Questions on notes Topicbox-Message-UUID: 2e316a86-ead4-11e9-9d60-3106f5b1d025 On Mon, 2008-11-03 at 08:03 -0500, erik quanstrom wrote: > > what is the point of reading /proc/n/ note for anything but a > > stopped/borken process? > > or a process already in a note handler? Could you elaborate, please? Do you mean that if the process enters its note handler, then the sure fire way to deal with all the pending notes would be to read a large block from your own /proc/getpid()/note ? That actually would make sense as far as non-blocking behavior goes. Although I still believe that the documentation could've been clearer on that. Frankly, I was trying to see whether an external process reading on somebody else's /proc/n/note would make any sense. One thing that I wanted to implement was a "note thief" process that would constantly read on a target's /proc/n/note and handle the notes externally using a different kind of IPC to communicate with the target. Am I dreaming? Would this be completely impossible to implement using /proc/n/note ? > by the way, with a small sleep in your read loop, i think 9vx > should be okay. the attached version with a 5ms sleep generates > no noticable load on my machine Sure. But is there nothing 9vx could do internally about a situation like this? How 9vx works is still a bit of a mystery to me, hence the question. > perhaps when doing very small io (like, say 0) furiously, the interrupts > caused by vx don't allow the sched to happen. Right. But the same scenario happening within, lets say, Qemu doesn't lead to a catastrophe. Thanks, Roman.