zio.c (209962) | zio.c (211931) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 35 unchanged lines hidden (view full) --- 44 * ========================================================================== 45 * I/O priority table 46 * ========================================================================== 47 */ 48uint8_t zio_priority_table[ZIO_PRIORITY_TABLE_SIZE] = { 49 0, /* ZIO_PRIORITY_NOW */ 50 0, /* ZIO_PRIORITY_SYNC_READ */ 51 0, /* ZIO_PRIORITY_SYNC_WRITE */ | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 35 unchanged lines hidden (view full) --- 44 * ========================================================================== 45 * I/O priority table 46 * ========================================================================== 47 */ 48uint8_t zio_priority_table[ZIO_PRIORITY_TABLE_SIZE] = { 49 0, /* ZIO_PRIORITY_NOW */ 50 0, /* ZIO_PRIORITY_SYNC_READ */ 51 0, /* ZIO_PRIORITY_SYNC_WRITE */ |
52 6, /* ZIO_PRIORITY_ASYNC_READ */ 53 4, /* ZIO_PRIORITY_ASYNC_WRITE */ 54 4, /* ZIO_PRIORITY_FREE */ 55 0, /* ZIO_PRIORITY_CACHE_FILL */ | |
56 0, /* ZIO_PRIORITY_LOG_WRITE */ | 52 0, /* ZIO_PRIORITY_LOG_WRITE */ |
53 1, /* ZIO_PRIORITY_CACHE_FILL */ 54 1, /* ZIO_PRIORITY_AGG */ 55 4, /* ZIO_PRIORITY_FREE */ 56 4, /* ZIO_PRIORITY_ASYNC_WRITE */ 57 6, /* ZIO_PRIORITY_ASYNC_READ */ |
|
57 10, /* ZIO_PRIORITY_RESILVER */ 58 20, /* ZIO_PRIORITY_SCRUB */ 59}; 60 61/* 62 * ========================================================================== 63 * I/O type descriptions 64 * ========================================================================== 65 */ 66char *zio_type_name[ZIO_TYPES] = { | 58 10, /* ZIO_PRIORITY_RESILVER */ 59 20, /* ZIO_PRIORITY_SCRUB */ 60}; 61 62/* 63 * ========================================================================== 64 * I/O type descriptions 65 * ========================================================================== 66 */ 67char *zio_type_name[ZIO_TYPES] = { |
67 "null", "read", "write", "free", "claim", "ioctl" }; | 68 "zio_null", "zio_read", "zio_write", "zio_free", "zio_claim", 69 "zio_ioctl" 70}; |
68 69#define SYNC_PASS_DEFERRED_FREE 1 /* defer frees after this pass */ 70#define SYNC_PASS_DONT_COMPRESS 4 /* don't compress after this pass */ 71#define SYNC_PASS_REWRITE 1 /* rewrite new bps after this pass */ 72 73/* 74 * ========================================================================== 75 * I/O kmem caches --- 861 unchanged lines hidden (view full) --- 937 * ========================================================================== 938 * Execute the I/O pipeline 939 * ========================================================================== 940 */ 941 942static void 943zio_taskq_dispatch(zio_t *zio, enum zio_taskq_type q) 944{ | 71 72#define SYNC_PASS_DEFERRED_FREE 1 /* defer frees after this pass */ 73#define SYNC_PASS_DONT_COMPRESS 4 /* don't compress after this pass */ 74#define SYNC_PASS_REWRITE 1 /* rewrite new bps after this pass */ 75 76/* 77 * ========================================================================== 78 * I/O kmem caches --- 861 unchanged lines hidden (view full) --- 940 * ========================================================================== 941 * Execute the I/O pipeline 942 * ========================================================================== 943 */ 944 945static void 946zio_taskq_dispatch(zio_t *zio, enum zio_taskq_type q) 947{ |
948 spa_t *spa = zio->io_spa; |
|
945 zio_type_t t = zio->io_type; 946 947 /* 948 * If we're a config writer or a probe, the normal issue and 949 * interrupt threads may all be blocked waiting for the config lock. 950 * In this case, select the otherwise-unused taskq for ZIO_TYPE_NULL. 951 */ 952 if (zio->io_flags & (ZIO_FLAG_CONFIG_WRITER | ZIO_FLAG_PROBE)) 953 t = ZIO_TYPE_NULL; 954 955 /* 956 * A similar issue exists for the L2ARC write thread until L2ARC 2.0. 957 */ 958 if (t == ZIO_TYPE_WRITE && zio->io_vd && zio->io_vd->vdev_aux) 959 t = ZIO_TYPE_NULL; 960 | 949 zio_type_t t = zio->io_type; 950 951 /* 952 * If we're a config writer or a probe, the normal issue and 953 * interrupt threads may all be blocked waiting for the config lock. 954 * In this case, select the otherwise-unused taskq for ZIO_TYPE_NULL. 955 */ 956 if (zio->io_flags & (ZIO_FLAG_CONFIG_WRITER | ZIO_FLAG_PROBE)) 957 t = ZIO_TYPE_NULL; 958 959 /* 960 * A similar issue exists for the L2ARC write thread until L2ARC 2.0. 961 */ 962 if (t == ZIO_TYPE_WRITE && zio->io_vd && zio->io_vd->vdev_aux) 963 t = ZIO_TYPE_NULL; 964 |
961 (void) taskq_dispatch_safe(zio->io_spa->spa_zio_taskq[t][q], | 965 /* 966 * If this is a high priority I/O, then use the high priority taskq. 967 */ 968 if (zio->io_priority == ZIO_PRIORITY_NOW && 969 spa->spa_zio_taskq[t][q + 1] != NULL) 970 q++; 971 972 ASSERT3U(q, <, ZIO_TASKQ_TYPES); 973 (void) taskq_dispatch_safe(spa->spa_zio_taskq[t][q], |
962 (task_func_t *)zio_execute, zio, &zio->io_task); 963} 964 965static boolean_t 966zio_taskq_member(zio_t *zio, enum zio_taskq_type q) 967{ 968 kthread_t *executor = zio->io_executor; 969 spa_t *spa = zio->io_spa; --- 1385 unchanged lines hidden --- | 974 (task_func_t *)zio_execute, zio, &zio->io_task); 975} 976 977static boolean_t 978zio_taskq_member(zio_t *zio, enum zio_taskq_type q) 979{ 980 kthread_t *executor = zio->io_executor; 981 spa_t *spa = zio->io_spa; --- 1385 unchanged lines hidden --- |