Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2017 08:37:05 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r315396 - stable/11/sys/kern
Message-ID:  <201703160837.v2G8b5sM033194@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Thu Mar 16 08:37:05 2017
New Revision: 315396
URL: https://svnweb.freebsd.org/changeset/base/315396

Log:
  MFC r312980:
  
  fd: sprinkle __read_mostly and __exclusive_cache_line

Modified:
  stable/11/sys/kern/kern_descrip.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/kern_descrip.c
==============================================================================
--- stable/11/sys/kern/kern_descrip.c	Thu Mar 16 08:35:27 2017	(r315395)
+++ stable/11/sys/kern/kern_descrip.c	Thu Mar 16 08:37:05 2017	(r315396)
@@ -97,8 +97,8 @@ MALLOC_DEFINE(M_FILECAPS, "filecaps", "d
 
 MALLOC_DECLARE(M_FADVISE);
 
-static uma_zone_t file_zone;
-static uma_zone_t filedesc0_zone;
+static __read_mostly uma_zone_t file_zone;
+static __read_mostly uma_zone_t filedesc0_zone;
 
 static int	closefp(struct filedesc *fdp, int fd, struct file *fp,
 		    struct thread *td, int holdleaders);
@@ -168,9 +168,9 @@ struct filedesc0 {
 /*
  * Descriptor management.
  */
-volatile int openfiles;			/* actual number of open files */
+volatile int __exclusive_cache_line openfiles; /* actual number of open files */
 struct mtx sigio_lock;		/* mtx to protect pointers to sigio */
-void (*mq_fdclose)(struct thread *td, int fd, struct file *fp);
+void __read_mostly (*mq_fdclose)(struct thread *td, int fd, struct file *fp);
 
 /*
  * If low >= size, just return low. Otherwise find the first zero bit in the



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703160837.v2G8b5sM033194>