From owner-svn-src-all@freebsd.org Tue Nov 15 01:34:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CE1AC402D5; Tue, 15 Nov 2016 01:34:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE06144A; Tue, 15 Nov 2016 01:34:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAF1Yc97090946; Tue, 15 Nov 2016 01:34:38 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAF1YcbE090944; Tue, 15 Nov 2016 01:34:38 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201611150134.uAF1YcbE090944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 15 Nov 2016 01:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308661 - in head/sys: conf kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2016 01:34:39 -0000 Author: adrian Date: Tue Nov 15 01:34:38 2016 New Revision: 308661 URL: https://svnweb.freebsd.org/changeset/base/308661 Log: [mips] make UMTX_CHAINS configurable at compile time. The default (512) wastes quite a bit of space which doesn't really buy us much on highly embedded systems which don't take a lot of locks in parallel. This makes it at least build time configurable so people can experiment. Modified: head/sys/conf/options head/sys/kern/kern_umtx.c Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Nov 15 01:20:36 2016 (r308660) +++ head/sys/conf/options Tue Nov 15 01:34:38 2016 (r308661) @@ -220,6 +220,7 @@ SYSVSHM opt_sysvipc.h SW_WATCHDOG opt_watchdog.h TURNSTILE_PROFILING UMTX_PROFILING +UMTX_CHAINS opt_global.h VERBOSE_SYSINIT # POSIX kernel options @@ -996,3 +997,4 @@ GPIO_SPI_DEBUG opt_gpio.h EVDEV_SUPPORT opt_evdev.h EVDEV_DEBUG opt_evdev.h UINPUT_DEBUG opt_evdev.h + Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Tue Nov 15 01:20:36 2016 (r308660) +++ head/sys/kern/kern_umtx.c Tue Nov 15 01:34:38 2016 (r308661) @@ -198,7 +198,9 @@ struct umtxq_chain { PRI_MAX_TIMESHARE : (td)->td_user_pri) #define GOLDEN_RATIO_PRIME 2654404609U +#ifndef UMTX_CHAINS #define UMTX_CHAINS 512 +#endif #define UMTX_SHIFTS (__WORD_BIT - 9) #define GET_SHARE(flags) \