On Fri, Jun 8, 2012 at 3:05 AM, <leonid.moiseichuk@xxxxxxxxx> wrote: >> -----Original Message----- >> From: ext Anton Vorontsov [mailto:anton.vorontsov@xxxxxxxxxx] >> Sent: 08 June, 2012 09:58 > ... >> If you're saying that we should set up a timer in the userland and constantly >> read /proc/vmstat, then we will cause CPU wake up every 100ms, which is >> not acceptable. Well, we can try to introduce deferrable timers for the >> userspace. But then it would still add a lot more overhead for our task, as this >> solution adds other two context switches to read and parse /proc/vmstat. I >> guess this is not a show-stopper though, so we can discuss this. >> >> Leonid, Pekka, what do you think about the idea? > > Seems to me not nice solution. Generating/parsing vmstat every 100ms plus wakeups it is what exactly should be avoid to have sense to API. No. I don't suggest to wake up every 100ms. I suggest to integrate existing subsystems. If you need any enhancement, just do it. > It also will cause page trashing because user-space code could be pushed out from cache if VM decide. This is completely unrelated issue. Even if notification code is not swapped, userland notify handling code still may be swapped. So, if you must avoid swap, you must use mlock. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>