From: Stefan W. <st...@sp...> - 2012-08-01 16:42:02
|
Hi! On Tue, Jul 31, 2012 at 05:38:51PM +0200, Miklos Szeredi wrote: > Stefan Westerfeld <st...@sp...> writes: > > On Mon, Jul 30, 2012 at 05:21:49PM +0200, Miklos Szeredi wrote: > >> Stefan Westerfeld <st...@sp...> writes: > >> > >> > 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. > >> > >> Does the following patch help? > >> > >> The wake_up_sync() call should prefer scheduling the woken up task on > >> the same CPU as the waker. > > > > No, the performance stays the same, and the filesystem thread(s) and the > > userspace client still get executed on different cpus most of the > > time. > Hmm, looks like this is because the wake_up() selects the first task on > the list and *then* checks if the CPU is the same. > > What we need instead is something that tries to find a fuse task that is > already on the same CPU and wake that up. > > Could you please try this patch? It's a gigantic hack, but should prove > or disprove the theory. Your patch doesn't compile here: Linux ubuntu 3.2.21 #2 SMP Fri Jul 27 12:56:14 CEST 2012 x86_64 x86_64 x86_64 GNU/Linux root@ubuntu:/usr/src/linux-source-3.2.0/linux-source-3.2.0# LANG=C make [...] CC [M] fs/fuse/dev.o fs/fuse/dev.c: In function 'queue_request': fs/fuse/dev.c:271:3: error: too many arguments to function '__wake_up_locked' include/linux/wait.h:160:6: note: declared here > The multithreaded loop should also be modified to start each thread with > an affinity to a different CPU. Yes, that sounds good to me. Cu... Stefan -- Stefan Westerfeld, Hamburg/Germany, http://space.twc.de/~stefan |