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 --- 7300 unchanged lines hidden (view full) --- 7309 */ 7310 ARCSTAT_BUMP(arcstat_l2_evict_lock_retry); 7311 mutex_exit(&dev->l2ad_mtx); 7312 mutex_enter(hash_lock); 7313 mutex_exit(hash_lock); 7314 goto top; 7315 } 7316 |
7317 /* 7318 * A header can't be on this list if it doesn't have L2 header. 7319 */ 7320 ASSERT(HDR_HAS_L2HDR(hdr)); |
7321 |
7322 /* Ensure this header has finished being written. */ 7323 ASSERT(!HDR_L2_WRITING(hdr)); 7324 ASSERT(!HDR_L2_WRITE_HEAD(hdr)); 7325 7326 if (!all && (hdr->b_l2hdr.b_daddr >= taddr || |
7327 hdr->b_l2hdr.b_daddr < dev->l2ad_hand)) { 7328 /* 7329 * We've evicted to the target address, 7330 * or the end of the device. 7331 */ 7332 mutex_exit(hash_lock); 7333 break; 7334 } 7335 |
7336 if (!HDR_HAS_L1HDR(hdr)) { 7337 ASSERT(!HDR_L2_READING(hdr)); 7338 /* 7339 * This doesn't exist in the ARC. Destroy. 7340 * arc_hdr_destroy() will call list_remove() 7341 * and decrement arcstat_l2_size. 7342 */ 7343 arc_change_state(arc_anon, hdr, hash_lock); --- 6 unchanged lines hidden (view full) --- 7350 * reads, since we may be about to write 7351 * over this location. 7352 */ 7353 if (HDR_L2_READING(hdr)) { 7354 ARCSTAT_BUMP(arcstat_l2_evict_reading); 7355 arc_hdr_set_flags(hdr, ARC_FLAG_L2_EVICTED); 7356 } 7357 |
7358 arc_hdr_l2hdr_destroy(hdr); 7359 } 7360 mutex_exit(hash_lock); 7361 } 7362 mutex_exit(&dev->l2ad_mtx); 7363} 7364 7365/* --- 487 unchanged lines hidden --- |