Alan Cox wrote:
Author: alc
Date: Sun Oct  4 18:53:10 2009
New Revision: 197750
URL: http://svn.freebsd.org/changeset/base/197750

Log:
  Align and pad the page queue and free page queue locks so that the linker
  can't possibly place them together within the same cache line.
MFC after: 3 weeks

Modified:
  head/sys/vm/vm_page.c
  head/sys/vm/vm_page.h

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c       Sun Oct  4 17:22:51 2009        (r197749)
+++ head/sys/vm/vm_page.c       Sun Oct  4 18:53:10 2009        (r197750)
@@ -135,8 +135,8 @@ __FBSDID("$FreeBSD$");
  */
struct vpgqueues vm_page_queues[PQ_COUNT];
-struct mtx vm_page_queue_mtx;
-struct mtx vm_page_queue_free_mtx;
+struct vpglocks vm_page_queue_lock;
+struct vpglocks vm_page_queue_free_lock;

I think you can do this by just:

struct mtx vm_page_queue_mtx __aligned(CACHE_LINE_SIZE);

without the need for a wrapper structure.

--
John Baldwin
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to