diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-11-30 13:31:41 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-11-30 13:31:41 +0000 |
commit | 9a92273153b72fdfab64727afb52d5af89fcbb01 (patch) | |
tree | 67202cbc580590b0338fbd9d1403e9a276d769c2 /usr/src | |
parent | b27a6a9c81b403a39941586ff9613958226267f2 (diff) | |
parent | fff286c84bdfba2236facfa589335ba013241952 (diff) | |
download | illumos-joyent-9a92273153b72fdfab64727afb52d5af89fcbb01.tar.gz |
[illumos-gate merge]
commit fff286c84bdfba2236facfa589335ba013241952
8824 libadutils: variable 'class' set but not used
commit 3934d9d608fe872ef1424714cad422bc624293b5
8698 AMD does not make an OPERTRON
commit c3f7a870373b38f01b2fb5e6ec30cb456c90ad32
8734 prof: variable 's_inv' set but not used
commit cf07d3da9915c0d22da8f59e991639f819463cef
8603 rename zilog's "zl_writer_lock" to "zl_issuer_lock"
Conflicts:
usr/src/uts/common/sys/smbios.h
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/sgs/prof/common/prof.c | 28 | ||||
-rw-r--r-- | usr/src/lib/libadutils/common/srv_query.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/sys/zil_impl.h | 10 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/zil.c | 44 | ||||
-rw-r--r-- | usr/src/uts/common/sys/smbios.h | 2 |
5 files changed, 40 insertions, 46 deletions
diff --git a/usr/src/cmd/sgs/prof/common/prof.c b/usr/src/cmd/sgs/prof/common/prof.c index c20a3888f6..38a0aa0a9f 100644 --- a/usr/src/cmd/sgs/prof/common/prof.c +++ b/usr/src/cmd/sgs/prof/common/prof.c @@ -25,10 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - - -#pragma ident "%Z%%M% %I% %E% SMI" +/* All Rights Reserved */ /* * Program profiling report generator. @@ -351,10 +348,6 @@ main(int argc, char **argv) long sf; /* Scale for index into pcounts: */ /* i(pc) = ((pc - pc_l) * sf)/bias. */ - /* LINTED: set but not used */ - long s_inv; /* Inverse: i_inv(i) = */ - /* {pc00, pc00+1, ... pc00+s_inv-1}. */ - unsigned pc_m; /* Range of PCs profiled: pc_m = pc_h - pc_l */ float t, t0; @@ -605,15 +598,13 @@ pc_l, pc_h, pc_m, pc_m, head.nfns, n_cc, n_pc)); sf >>= 1; bias >>= 1; } - s_inv = pc_m/n_pc; /* Range of PCs mapped into one index. */ /* BEGIN CSTYLED */ OLD_DEBUG( if (debug_value) { - Fprint( - stderr, - "sf = %d, s_inv = %d bias = %d\n", - (long)sf, s_inv, bias); + + Fprint(stderr, "sf = %d, s_inv = %d bias = %d\n", + (long)sf, pc_m / n_pc, bias); } ); /* END CSTYLED */ @@ -1020,8 +1011,8 @@ if (debug_value) { * option causes certain additional information to be printed. */ -OLD_DEBUG(if (debug_value) Fprint(stderr, -"Time unaccounted for: %.7G\n", t_tot - t0)); + OLD_DEBUG(if (debug_value) Fprint(stderr, + "Time unaccounted for: %.7G\n", t_tot - t0)); if (sort) /* If comparison routine given then use it. */ qsort((char *)slist, (unsigned)n_syms, @@ -1219,11 +1210,14 @@ eofon(FILE *iop, char *fn) exit(1); } -/* Version of perror() that prints cmdname first. */ +/* + * Version of perror() that prints cmdname first. + * Print system error message & exit. + */ static void Perror(char *s) -{ /* Print system error message & exit. */ +{ int err = errno; /* Save current errno in case */ Fprint(stderr, "%s: ", cmdname); diff --git a/usr/src/lib/libadutils/common/srv_query.c b/usr/src/lib/libadutils/common/srv_query.c index aa7a833421..fd49e2f9ce 100644 --- a/usr/src/lib/libadutils/common/srv_query.c +++ b/usr/src/lib/libadutils/common/srv_query.c @@ -261,7 +261,7 @@ srv_parse(uchar_t *msg, int len, int *scnt, int *maxcnt) uchar_t *end; uint16_t type; /* LINTED E_FUNC_SET_NOT_USED */ - uint16_t class; + uint16_t class __unused; uint32_t rttl; uint16_t size; char namebuf[NS_MAXDNAME]; diff --git a/usr/src/uts/common/fs/zfs/sys/zil_impl.h b/usr/src/uts/common/fs/zfs/sys/zil_impl.h index 308f4a5da3..543ba1ee1e 100644 --- a/usr/src/uts/common/fs/zfs/sys/zil_impl.h +++ b/usr/src/uts/common/fs/zfs/sys/zil_impl.h @@ -57,9 +57,9 @@ typedef enum { * Log write block (lwb) * * Prior to an lwb being issued to disk via zil_lwb_write_issue(), it - * will be protected by the zilog's "zl_writer_lock". Basically, prior + * will be protected by the zilog's "zl_issuer_lock". Basically, prior * to it being issued, it will only be accessed by the thread that's - * holding the "zl_writer_lock". After the lwb is issued, the zilog's + * holding the "zl_issuer_lock". After the lwb is issued, the zilog's * "zl_lock" is used to protect the lwb against concurrent access. */ typedef struct lwb { @@ -91,10 +91,10 @@ typedef struct lwb { * * The "zcw_lock" field is used to protect the commit waiter against * concurrent access. This lock is often acquired while already holding - * the zilog's "zl_writer_lock" or "zl_lock"; see the functions + * the zilog's "zl_issuer_lock" or "zl_lock"; see the functions * zil_process_commit_list() and zil_lwb_flush_vdevs_done() as examples * of this. Thus, one must be careful not to acquire the - * "zl_writer_lock" or "zl_lock" when already holding the "zcw_lock"; + * "zl_issuer_lock" or "zl_lock" when already holding the "zcw_lock"; * e.g. see the zil_commit_waiter_timeout() function. */ typedef struct zil_commit_waiter { @@ -161,7 +161,7 @@ struct zilog { uint8_t zl_keep_first; /* keep first log block in destroy */ uint8_t zl_replay; /* replaying records while set */ uint8_t zl_stop_sync; /* for debugging */ - kmutex_t zl_writer_lock; /* single writer, per ZIL, at a time */ + kmutex_t zl_issuer_lock; /* single writer, per ZIL, at a time */ uint8_t zl_logbias; /* latency or throughput */ uint8_t zl_sync; /* synchronous or asynchronous */ int zl_parse_error; /* last zil_parse() error */ diff --git a/usr/src/uts/common/fs/zfs/zil.c b/usr/src/uts/common/fs/zfs/zil.c index df43790a5e..42c571b107 100644 --- a/usr/src/uts/common/fs/zfs/zil.c +++ b/usr/src/uts/common/fs/zfs/zil.c @@ -1096,7 +1096,7 @@ zil_lwb_write_open(zilog_t *zilog, lwb_t *lwb) zbookmark_phys_t zb; zio_priority_t prio; - ASSERT(MUTEX_HELD(&zilog->zl_writer_lock)); + ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock)); ASSERT3P(lwb, !=, NULL); EQUIV(lwb->lwb_root_zio == NULL, lwb->lwb_state == LWB_STATE_CLOSED); EQUIV(lwb->lwb_root_zio != NULL, lwb->lwb_state == LWB_STATE_OPENED); @@ -1193,7 +1193,7 @@ zil_lwb_write_issue(zilog_t *zilog, lwb_t *lwb) int i, error; boolean_t slog; - ASSERT(MUTEX_HELD(&zilog->zl_writer_lock)); + ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock)); ASSERT3P(lwb->lwb_root_zio, !=, NULL); ASSERT3P(lwb->lwb_write_zio, !=, NULL); ASSERT3S(lwb->lwb_state, ==, LWB_STATE_OPENED); @@ -1327,7 +1327,7 @@ zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) char *lr_buf; uint64_t dlen, dnow, lwb_sp, reclen, txg; - ASSERT(MUTEX_HELD(&zilog->zl_writer_lock)); + ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock)); ASSERT3P(lwb, !=, NULL); ASSERT3P(lwb->lwb_buf, !=, NULL); @@ -1743,7 +1743,7 @@ zil_get_commit_list(zilog_t *zilog) uint64_t otxg, txg; list_t *commit_list = &zilog->zl_itx_commit_list; - ASSERT(MUTEX_HELD(&zilog->zl_writer_lock)); + ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock)); if (spa_freeze_txg(zilog->zl_spa) != UINT64_MAX) /* ziltest support */ otxg = ZILTEST_TXG; @@ -1850,7 +1850,7 @@ zil_prune_commit_list(zilog_t *zilog) { itx_t *itx; - ASSERT(MUTEX_HELD(&zilog->zl_writer_lock)); + ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock)); while (itx = list_head(&zilog->zl_itx_commit_list)) { lr_t *lrc = &itx->itx_lr; @@ -1900,12 +1900,12 @@ zil_commit_writer_stall(zilog_t *zilog) * crash (because the previous lwb on-disk would not point to * it). * - * We must hold the zilog's zl_writer_lock while we do this, to + * We must hold the zilog's zl_issuer_lock while we do this, to * ensure no new threads enter zil_process_commit_list() until * all lwb's in the zl_lwb_list have been synced and freed * (which is achieved via the txg_wait_synced() call). */ - ASSERT(MUTEX_HELD(&zilog->zl_writer_lock)); + ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock)); txg_wait_synced(zilog->zl_dmu_pool, 0); ASSERT3P(list_tail(&zilog->zl_lwb_list), ==, NULL); } @@ -1924,7 +1924,7 @@ zil_process_commit_list(zilog_t *zilog) lwb_t *lwb; itx_t *itx; - ASSERT(MUTEX_HELD(&zilog->zl_writer_lock)); + ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock)); /* * Return if there's nothing to commit before we dirty the fs by @@ -2094,17 +2094,17 @@ zil_commit_writer(zilog_t *zilog, zil_commit_waiter_t *zcw) ASSERT(spa_writeable(zilog->zl_spa)); ASSERT0(zilog->zl_suspend); - mutex_enter(&zilog->zl_writer_lock); + mutex_enter(&zilog->zl_issuer_lock); if (zcw->zcw_lwb != NULL || zcw->zcw_done) { /* * It's possible that, while we were waiting to acquire - * the "zl_writer_lock", another thread committed this + * the "zl_issuer_lock", another thread committed this * waiter to an lwb. If that occurs, we bail out early, * without processing any of the zilog's queue of itxs. * * On certain workloads and system configurations, the - * "zl_writer_lock" can become highly contended. In an + * "zl_issuer_lock" can become highly contended. In an * attempt to reduce this contention, we immediately drop * the lock if the waiter has already been processed. * @@ -2121,13 +2121,13 @@ zil_commit_writer(zilog_t *zilog, zil_commit_waiter_t *zcw) zil_process_commit_list(zilog); out: - mutex_exit(&zilog->zl_writer_lock); + mutex_exit(&zilog->zl_issuer_lock); } static void zil_commit_waiter_timeout(zilog_t *zilog, zil_commit_waiter_t *zcw) { - ASSERT(!MUTEX_HELD(&zilog->zl_writer_lock)); + ASSERT(!MUTEX_HELD(&zilog->zl_issuer_lock)); ASSERT(MUTEX_HELD(&zcw->zcw_lock)); ASSERT3B(zcw->zcw_done, ==, B_FALSE); @@ -2139,7 +2139,7 @@ zil_commit_waiter_timeout(zilog_t *zilog, zil_commit_waiter_t *zcw) * If the lwb has already been issued by another thread, we can * immediately return since there's no work to be done (the * point of this function is to issue the lwb). Additionally, we - * do this prior to acquiring the zl_writer_lock, to avoid + * do this prior to acquiring the zl_issuer_lock, to avoid * acquiring it when it's not necessary to do so. */ if (lwb->lwb_state == LWB_STATE_ISSUED || @@ -2148,13 +2148,13 @@ zil_commit_waiter_timeout(zilog_t *zilog, zil_commit_waiter_t *zcw) /* * In order to call zil_lwb_write_issue() we must hold the - * zilog's "zl_writer_lock". We can't simply acquire that lock, + * zilog's "zl_issuer_lock". We can't simply acquire that lock, * since we're already holding the commit waiter's "zcw_lock", * and those two locks are aquired in the opposite order * elsewhere. */ mutex_exit(&zcw->zcw_lock); - mutex_enter(&zilog->zl_writer_lock); + mutex_enter(&zilog->zl_issuer_lock); mutex_enter(&zcw->zcw_lock); /* @@ -2172,7 +2172,7 @@ zil_commit_waiter_timeout(zilog_t *zilog, zil_commit_waiter_t *zcw) /* * We've already checked this above, but since we hadn't - * acquired the zilog's zl_writer_lock, we have to perform this + * acquired the zilog's zl_issuer_lock, we have to perform this * check a second time while holding the lock. We can't call * zil_lwb_write_issue() if the lwb had already been issued. */ @@ -2235,7 +2235,7 @@ zil_commit_waiter_timeout(zilog_t *zilog, zil_commit_waiter_t *zcw) } out: - mutex_exit(&zilog->zl_writer_lock); + mutex_exit(&zilog->zl_issuer_lock); ASSERT(MUTEX_HELD(&zcw->zcw_lock)); } @@ -2262,7 +2262,7 @@ static void zil_commit_waiter(zilog_t *zilog, zil_commit_waiter_t *zcw) { ASSERT(!MUTEX_HELD(&zilog->zl_lock)); - ASSERT(!MUTEX_HELD(&zilog->zl_writer_lock)); + ASSERT(!MUTEX_HELD(&zilog->zl_issuer_lock)); ASSERT(spa_writeable(zilog->zl_spa)); ASSERT0(zilog->zl_suspend); @@ -2511,7 +2511,7 @@ zil_commit_itx_assign(zilog_t *zilog, zil_commit_waiter_t *zcw) * on two fundamental concepts: * * 1. The creation and issuance of lwb zio's is protected by - * the zilog's "zl_writer_lock", which ensures only a single + * the zilog's "zl_issuer_lock", which ensures only a single * thread is creating and/or issuing lwb's at a time * 2. The "previous" lwb is a child of the "current" lwb * (leveraging the zio parent-child depenency graph) @@ -2760,7 +2760,7 @@ zil_alloc(objset_t *os, zil_header_t *zh_phys) zilog->zl_last_lwb_latency = 0; mutex_init(&zilog->zl_lock, NULL, MUTEX_DEFAULT, NULL); - mutex_init(&zilog->zl_writer_lock, NULL, MUTEX_DEFAULT, NULL); + mutex_init(&zilog->zl_issuer_lock, NULL, MUTEX_DEFAULT, NULL); for (int i = 0; i < TXG_SIZE; i++) { mutex_init(&zilog->zl_itxg[i].itxg_lock, NULL, @@ -2805,7 +2805,7 @@ zil_free(zilog_t *zilog) mutex_destroy(&zilog->zl_itxg[i].itxg_lock); } - mutex_destroy(&zilog->zl_writer_lock); + mutex_destroy(&zilog->zl_issuer_lock); mutex_destroy(&zilog->zl_lock); cv_destroy(&zilog->zl_cv_suspend); diff --git a/usr/src/uts/common/sys/smbios.h b/usr/src/uts/common/sys/smbios.h index 7a8637e222..84d925be78 100644 --- a/usr/src/uts/common/sys/smbios.h +++ b/usr/src/uts/common/sys/smbios.h @@ -632,7 +632,7 @@ typedef struct smbios_processor { #define SMB_PRF_OPTERON_X1K 0x67 /* AMD Opteron X1000 */ #define SMB_PRF_OPTERON_X2K 0x68 /* AMD Opteron X2000 APU */ #define SMB_PRF_OPTERON_A 0x69 /* AMD Opteron A Series */ -#define SMB_PRF_OPERTON_X3K 0x6A /* AMD Opteron X3000 APU */ +#define SMB_PRF_OPTERON_X3K 0x6A /* AMD Opteron X3000 APU */ #define SMB_PRF_ZEN 0x6B /* AMD Zen Processor Family */ #define SMB_PRF_HOBBIT 0x70 /* Hobbit */ #define SMB_PRF_TM5000 0x78 /* Crusoe TM5000 */ |