Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Use multiple cache lines for fd_dfdfile elements whe...
details: https://anonhg.NetBSD.org/src/rev/83ae5707734d
branches: trunk
changeset: 464443:83ae5707734d
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Oct 06 07:15:34 2019 +0000
description:
Use multiple cache lines for fd_dfdfile elements when necessary.
diffstat:
sys/sys/filedesc.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 252f2bc8945a -r 83ae5707734d sys/sys/filedesc.h
--- a/sys/sys/filedesc.h Sun Oct 06 06:10:44 2019 +0000
+++ b/sys/sys/filedesc.h Sun Oct 06 07:15:34 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: filedesc.h,v 1.64 2017/12/26 08:30:58 kamil Exp $ */
+/* $NetBSD: filedesc.h,v 1.65 2019/10/06 07:15:34 mlelstv Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -112,6 +112,8 @@
kcondvar_t ff_closing; /* d: notifier for close */
} fdfile_t;
+#define FDFILE_SIZE ((sizeof(fdfile_t)+CACHE_LINE_SIZE-1)/CACHE_LINE_SIZE*CACHE_LINE_SIZE)
+
/* Reference count */
#define FR_CLOSING (0x80000000) /* closing: must interlock */
#define FR_MASK (~FR_CLOSING) /* reference count */
@@ -132,7 +134,7 @@
* Built-in fdfile_t records first, since they have strict
* alignment requirements.
*/
- uint8_t fd_dfdfile[NDFDFILE][CACHE_LINE_SIZE];
+ uint8_t fd_dfdfile[NDFDFILE][FDFILE_SIZE];
/*
* All of the remaining fields are locked by fd_lock.
*/
Home |
Main Index |
Thread Index |
Old Index