lkml.org 
[lkml]   [2005]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Preempt & Xfs Question
On Thu, Jan 27, 2005 at 05:46:54PM +0000, Matthias-Christian Ott wrote:

> How did you fix it?

I suggested:

===== fs/xfs/linux-2.6/xfs_stats.h 1.9 vs edited =====
Index: cw-current/fs/xfs/linux-2.6/xfs_stats.h
===================================================================
--- cw-current.orig/fs/xfs/linux-2.6/xfs_stats.h 2005-01-17 16:03:59.656946818 -0800
+++ cw-current/fs/xfs/linux-2.6/xfs_stats.h 2005-01-17 16:06:50.692361597 -0800
@@ -142,9 +142,9 @@

/* We don't disable preempt, not too worried about poking the
* wrong cpu's stat for now */
-#define XFS_STATS_INC(count) (__get_cpu_var(xfsstats).count++)
-#define XFS_STATS_DEC(count) (__get_cpu_var(xfsstats).count--)
-#define XFS_STATS_ADD(count, inc) (__get_cpu_var(xfsstats).count += (inc))
+#define XFS_STATS_INC(count) (per_cpu(xfsstats, __smp_processor_id()).count++)
+#define XFS_STATS_DEC(count) (per_cpu(xfsstats, __smp_processor_id()).count--)
+#define XFS_STATS_ADD(count, inc) (per_cpu(xfsstats, __smp_processor_id()).count += (inc))

extern void xfs_init_procfs(void);
extern void xfs_cleanup_procfs(void);
but what was checked in was a bit cleaner.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.059 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site