From: <mis...@us...> - 2007-06-13 15:59:46
|
Revision: 1034 http://svn.sourceforge.net/hackndev/?rev=1034&view=rev Author: miska_tx Date: 2007-06-13 08:59:41 -0700 (Wed, 13 Jun 2007) Log Message: ----------- Some patches to aufs to make it possible to compile it. Modified Paths: -------------- linux4palm/linux/trunk/fs/aufs/Kconfig linux4palm/linux/trunk/fs/aufs/sysaufs.c linux4palm/linux/trunk/fs/aufs/wkq.c linux4palm/linux/trunk/include/linux/aufs_type.h Modified: linux4palm/linux/trunk/fs/aufs/Kconfig =================================================================== --- linux4palm/linux/trunk/fs/aufs/Kconfig 2007-06-13 15:16:08 UTC (rev 1033) +++ linux4palm/linux/trunk/fs/aufs/Kconfig 2007-06-13 15:59:41 UTC (rev 1034) @@ -10,7 +10,26 @@ different from Unionfs while keeping the basic features. See Unionfs for the basic features. if AUFS -comment "These options are generated automatically for 2.6.21-hnd1" +config AUFS_NWKQ_DEF + int "Number of aufs kernel threads" + depends on AUFS + default "4" + help + Those threads stay in the system and handle the special I/O requests + from aufs. The default value is 4. If you enable CONFIG_SYSFS, you can + check this value through <sysfs>/module/aufs/parameters/nwkq. So how + many threads is enough? You can check it by <sysfs>/fs/aufs/stat, + if you enable CONFIG_AUFS_SUSAUFS too. It shows the maximum number of the + enqueued work at a time per a thread. Usually they are all small numbers or + 0. If your work- load is heavy and you feel the response is low, then check + these values. If there are no zero and any of them is larger than 2 or 3, + you should set 'nwkq' module parameter greater then the default value. + But the reason of the bad response is in your branch filesystem, to + increase the number of aufs thread will not help you. The last number in + <sysfs>/fs/aufs/stat after comma is the maxi- mum number of the 'no-wait' + enqueued work at a time. Aufs enqueues such work to the system global + workqueue called 'events', but doesn't wait for its completion. Usually they + does no harm the time-performance of aufs. config AUFS_FAKE_DM bool "Use simplified (fake) nameidata" depends on AUFS Modified: linux4palm/linux/trunk/fs/aufs/sysaufs.c =================================================================== --- linux4palm/linux/trunk/fs/aufs/sysaufs.c 2007-06-13 15:16:08 UTC (rev 1033) +++ linux4palm/linux/trunk/fs/aufs/sysaufs.c 2007-06-13 15:59:41 UTC (rev 1034) @@ -596,7 +596,7 @@ return err; } -void __exit sysaufs_fin(void) +void sysaufs_fin(void) { mutex_lock(&aufs_sbilist_mtx); unreg(&aufs_subsys, g_array, ARRAY_SIZE(g_array), &fs_subsys); Modified: linux4palm/linux/trunk/fs/aufs/wkq.c =================================================================== --- linux4palm/linux/trunk/fs/aufs/wkq.c 2007-06-13 15:16:08 UTC (rev 1033) +++ linux4palm/linux/trunk/fs/aufs/wkq.c 2007-06-13 15:59:41 UTC (rev 1034) @@ -91,8 +91,12 @@ old = wkq->max_busy; if (new <= old) break; +#ifdef __LINUX_ARM_ARCH__ + } while (atomic_cmpxchg((atomic_t *)(&wkq->max_busy), old, new) == old); +#else } while (cmpxchg(&wkq->max_busy, old, new) == old); #endif +#endif } static int enqueue(struct au_wkq *wkq, struct au_wkinfo *wkinfo) Modified: linux4palm/linux/trunk/include/linux/aufs_type.h =================================================================== --- linux4palm/linux/trunk/include/linux/aufs_type.h 2007-06-13 15:16:08 UTC (rev 1033) +++ linux4palm/linux/trunk/include/linux/aufs_type.h 2007-06-13 15:59:41 UTC (rev 1034) @@ -27,12 +27,10 @@ /* ---------------------------------------------------------------------- */ +typedef short aufs_bindex_t; #ifdef CONFIG_AUFS_BRANCH_MAX_127 -typedef char aufs_bindex_t; #define AUFS_BRANCH_MAX 127 -#else -typedef short aufs_bindex_t; -#ifdef CONFIG_AUFS_BRANCH_MAX_511 +#elif CONFIG_AUFS_BRANCH_MAX_511 #define AUFS_BRANCH_MAX 511 #elif defined(CONFIG_AUFS_BRANCH_MAX_1023) #define AUFS_BRANCH_MAX 1023 @@ -41,7 +39,6 @@ #else #error unknown CONFIG_AUFS_BRANCH_MAX value #endif -#endif #define AUFS_NAME "aufs" #define AUFS_FSTYPE AUFS_NAME @@ -56,7 +53,11 @@ #define AUFS_DIRWH_DEF 3 #define AUFS_RDCACHE_DEF 10 /* seconds */ #define AUFS_WKQ_NAME AUFS_NAME "d" +#ifdef CONFIG_AUFS_NWKQ_DEF +#define AUFS_NWKQ_DEF CONFIG_AUFS_NWKQ_DEF +#else #define AUFS_NWKQ_DEF 4 +#endif #ifdef CONFIG_AUFS_COMPAT #define AUFS_DIROPQ_NAME "__dir_opaque" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |