From owner-svn-src-head@freebsd.org Fri Jul 6 06:21:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF04910429CA; Fri, 6 Jul 2018 06:21:25 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84D518D54B; Fri, 6 Jul 2018 06:21:25 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6644E24E5D; Fri, 6 Jul 2018 06:21:25 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w666LPAp065119; Fri, 6 Jul 2018 06:21:25 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w666LPm3065118; Fri, 6 Jul 2018 06:21:25 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807060621.w666LPm3065118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 6 Jul 2018 06:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336022 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 336022 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2018 06:21:26 -0000 Author: mmacy Date: Fri Jul 6 06:21:24 2018 New Revision: 336022 URL: https://svnweb.freebsd.org/changeset/base/336022 Log: hwpmc: remove hacks to work around incorrect pc_domain Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_logging.c Fri Jul 6 06:20:03 2018 (r336021) +++ head/sys/dev/hwpmc/hwpmc_logging.c Fri Jul 6 06:21:24 2018 (r336022) @@ -65,15 +65,7 @@ __FBSDID("$FreeBSD$"); #include #endif -#ifdef NUMA -#define NDOMAINS vm_ndomains #define curdomain PCPU_GET(domain) -#else -#define NDOMAINS 1 -#define curdomain 0 -#define malloc_domain(size, type, domain, flags) malloc((size), (type), (flags)) -#define free_domain(addr, type) free(addr, type) -#endif /* * Sysctl tunables @@ -1261,7 +1253,7 @@ pmclog_initialize() pmc_nlogbuffers_pcpu = PMC_NLOGBUFFERS_PCPU; pmclog_buffer_size = PMC_LOG_BUFFER_SIZE; } - for (domain = 0; domain < NDOMAINS; domain++) { + for (domain = 0; domain < vm_ndomains; domain++) { int ncpus = pmc_dom_hdrs[domain]->pdbh_ncpus; int total = ncpus*pmc_nlogbuffers_pcpu; @@ -1293,7 +1285,7 @@ pmclog_shutdown() mtx_destroy(&pmc_kthread_mtx); - for (domain = 0; domain < NDOMAINS; domain++) { + for (domain = 0; domain < vm_ndomains; domain++) { while ((plb = TAILQ_FIRST(&pmc_dom_hdrs[domain]->pdbh_head)) != NULL) { TAILQ_REMOVE(&pmc_dom_hdrs[domain]->pdbh_head, plb, plb_next); free(plb->plb_base, M_PMC);