aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/pcpu.h
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2012-09-18 00:43:15 +0000
committerAttilio Rao <attilio@FreeBSD.org>2012-09-18 00:43:15 +0000
commit6a612df12c9a754f4edbdbfe06b8a91237e451b5 (patch)
tree2dc46c4f4ca9ef2ec8d826583b3a98946f511950 /sys/sys/pcpu.h
parentd94f2d7f34a9aa67f9750ff9fe219471404a6bae (diff)
downloadsrc-6a612df12c9a754f4edbdbfe06b8a91237e451b5.tar.gz
src-6a612df12c9a754f4edbdbfe06b8a91237e451b5.zip
Remove namespace pollution in _rmlock.h by defining rm_queue structure
directly in _rmlock.h and then including it (and its dependencies) in pcpu.h. This leads to few _*.h headers to be included in pcpu.h but this is not considered a big deal. Really pc_rm_queue should be implemented as a dynamic member with DPCPU interface, but we really want to keep the read acquisition as fast as possible, so even the further pc_dynamic indirection should be avoided, and the pollution is dealt like this. Discussed with: jhb MFC after: 1 week
Notes
Notes: svn path=/head/; revision=240624
Diffstat (limited to 'sys/sys/pcpu.h')
-rw-r--r--sys/sys/pcpu.h23
1 files changed, 5 insertions, 18 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h
index 4a4ec005c0fd..e86038565755 100644
--- a/sys/sys/pcpu.h
+++ b/sys/sys/pcpu.h
@@ -38,7 +38,11 @@
#endif
#include <sys/_cpuset.h>
+#include <sys/_lock.h>
+#include <sys/_mutex.h>
+#include <sys/_sx.h>
#include <sys/queue.h>
+#include <sys/_rmlock.h>
#include <sys/vmmeter.h>
#include <sys/resource.h>
#include <machine/pcpu.h>
@@ -137,15 +141,6 @@ extern uintptr_t dpcpu_off[];
#endif /* _KERNEL */
-/*
- * XXXUPS remove as soon as we have per cpu variable
- * linker sets and can define rm_queue in _rm_lock.h
- */
-struct rm_queue {
- struct rm_queue* volatile rmq_next;
- struct rm_queue* volatile rmq_prev;
-};
-
/*
* This structure maps out the global data that needs to be kept on a
* per-cpu basis. The members are accessed via the PCPU_GET/SET/PTR
@@ -169,15 +164,7 @@ struct pcpu {
void *pc_netisr; /* netisr SWI cookie */
int pc_dnweight; /* vm_page_dontneed() */
int pc_domain; /* Memory domain. */
-
- /*
- * Stuff for read mostly lock
- *
- * XXXUPS remove as soon as we have per cpu variable
- * linker sets.
- */
- struct rm_queue pc_rm_queue;
-
+ struct rm_queue pc_rm_queue; /* rmlock list of trackers */
uintptr_t pc_dynamic; /* Dynamic per-cpu data area */
/*