Date: Mon, 6 Apr 2020 14:58:24 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r359659 - stable/12/sys/dev/hwpmc Message-ID: <202004061458.036EwOdp099466@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Apr 6 14:58:24 2020 New Revision: 359659 URL: https://svnweb.freebsd.org/changeset/base/359659 Log: MFC r359437: Fix accounting of hwpmc's thread descriptor freelist. Modified: stable/12/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/12/sys/dev/hwpmc/hwpmc_mod.c Mon Apr 6 14:56:19 2020 (r359658) +++ stable/12/sys/dev/hwpmc/hwpmc_mod.c Mon Apr 6 14:58:24 2020 (r359659) @@ -2426,12 +2426,13 @@ pmc_thread_descriptor_pool_free_task(void *arg __unuse int delta; LIST_INIT(&tmplist); + /* Determine what changes, if any, we need to make. */ mtx_lock_spin(&pmc_threadfreelist_mtx); delta = pmc_threadfreelist_entries - pmc_threadfreelist_max; - while (delta > 0 && - (pt = LIST_FIRST(&pmc_threadfreelist)) != NULL) { + while (delta > 0 && (pt = LIST_FIRST(&pmc_threadfreelist)) != NULL) { delta--; + pmc_threadfreelist_entries--; LIST_REMOVE(pt, pt_next); LIST_INSERT_HEAD(&tmplist, pt, pt_next); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004061458.036EwOdp099466>