From: Han-Wen N. <ha...@gm...> - 2012-07-25 20:02:28
|
On Wed, Jul 25, 2012 at 10:48 AM, Stefan Westerfeld <st...@sp...> wrote: > Hi! > > On Wed, Jul 25, 2012 at 10:24:04AM -0700, Han-Wen Nienhuys wrote: >> On Wed, Jul 25, 2012 at 9:12 AM, Stefan Westerfeld <st...@sp...> wrote: >> >> >> Similar results here: >> >> >> >> [...] >> >> >> >> Implementing this in FUSE seems like a worthwhile optimization point. >> > >> > Ok, I'll try to create a patch against FUSE to get this speedup. >> > >> >> What will happen if the FS is accessed from multiple processes running >> on different CPUs? > > The way I think it should work is that the FUSE fs will have different worker > threads which are bound to one cpu per thread. If two processes running on cpu > 1 and 3 access the filesystem, FUSE should use a worker thread bound to cpu 1 > to process requests from the userspace process running on cpu 1 and another > worker thread bound to cpu 3 to process requests from the userspace process > running on cpu 3. This will perform poorly: the fuse library has a critical section protected by mutexes, which are taken for each request. (see fuse_loop_mt.c). If you make those run on different cpus, you will have cache line bouncing for each request. > Of course in this case the filesystem worker threads will not fully reside on > the same cpu as the userspace processes, so it may not perform as good as in > the case I measured with my test. > > Cu... Stefan > -- > Stefan Westerfeld, Hamburg/Germany, http://space.twc.de/~stefan -- Han-Wen Nienhuys - ha...@xs... - http://www.xs4all.nl/~hanwen |