git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch KM_SLEEP to KM_PUSHPAGE
[zfs.git]
/
module
/
zfs
/
arc.c
diff --git
a/module/zfs/arc.c
b/module/zfs/arc.c
index
d6eaa6c
..
e75a3f5
100644
(file)
--- a/
module/zfs/arc.c
+++ b/
module/zfs/arc.c
@@
-20,6
+20,8
@@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
*/
/*
*/
/*
@@
-1284,7
+1286,7
@@
arc_buf_alloc(spa_t *spa, int size, void *tag, arc_buf_contents_t type)
ASSERT(BUF_EMPTY(hdr));
hdr->b_size = size;
hdr->b_type = type;
ASSERT(BUF_EMPTY(hdr));
hdr->b_size = size;
hdr->b_type = type;
- hdr->b_spa = spa_guid(spa);
+ hdr->b_spa = spa_
load_
guid(spa);
hdr->b_state = arc_anon;
hdr->b_arc_access = 0;
buf = kmem_cache_alloc(buf_cache, KM_PUSHPAGE);
hdr->b_state = arc_anon;
hdr->b_arc_access = 0;
buf = kmem_cache_alloc(buf_cache, KM_PUSHPAGE);
@@
-2056,7
+2058,7
@@
arc_flush(spa_t *spa)
uint64_t guid = 0;
if (spa)
uint64_t guid = 0;
if (spa)
- guid = spa_guid(spa);
+ guid = spa_
load_
guid(spa);
while (list_head(&arc_mru->arcs_list[ARC_BUFC_DATA])) {
(void) arc_evict(arc_mru, guid, -1, FALSE, ARC_BUFC_DATA);
while (list_head(&arc_mru->arcs_list[ARC_BUFC_DATA])) {
(void) arc_evict(arc_mru, guid, -1, FALSE, ARC_BUFC_DATA);
@@
-2887,7
+2889,7
@@
arc_read_nolock(zio_t *pio, spa_t *spa, const blkptr_t *bp,
arc_buf_t *buf = NULL;
kmutex_t *hash_lock;
zio_t *rzio;
arc_buf_t *buf = NULL;
kmutex_t *hash_lock;
zio_t *rzio;
- uint64_t guid = spa_guid(spa);
+ uint64_t guid = spa_
load_
guid(spa);
top:
hdr = buf_hash_find(guid, BP_IDENTITY(bp), BP_PHYSICAL_BIRTH(bp),
top:
hdr = buf_hash_find(guid, BP_IDENTITY(bp), BP_PHYSICAL_BIRTH(bp),
@@
-3545,7
+3547,7
@@
arc_write(zio_t *pio, spa_t *spa, uint64_t txg,
ASSERT(hdr->b_acb == NULL);
if (l2arc)
hdr->b_flags |= ARC_L2CACHE;
ASSERT(hdr->b_acb == NULL);
if (l2arc)
hdr->b_flags |= ARC_L2CACHE;
- callback = kmem_zalloc(sizeof (arc_write_callback_t), KM_
SLEEP
);
+ callback = kmem_zalloc(sizeof (arc_write_callback_t), KM_
PUSHPAGE
);
callback->awcb_ready = ready;
callback->awcb_done = done;
callback->awcb_private = private;
callback->awcb_ready = ready;
callback->awcb_done = done;
callback->awcb_private = private;
@@
-3723,11
+3725,7
@@
arc_init(void)
/* set min cache to 1/32 of all memory, or 64MB, whichever is more */
arc_c_min = MAX(arc_c / 4, 64<<20);
/* set min cache to 1/32 of all memory, or 64MB, whichever is more */
arc_c_min = MAX(arc_c / 4, 64<<20);
- /* set max to 1/2 of all memory, or all but 4GB, whichever is more */
- if (arc_c * 8 >= ((uint64_t)4<<30))
- arc_c_max = (arc_c * 8) - ((uint64_t)4<<30);
- else
- arc_c_max = arc_c_min;
+ /* set max to 1/2 of all memory */
arc_c_max = MAX(arc_c * 4, arc_c_max);
/*
arc_c_max = MAX(arc_c * 4, arc_c_max);
/*
@@
-4526,7
+4524,7
@@
l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz)
boolean_t have_lock, full;
l2arc_write_callback_t *cb;
zio_t *pio, *wzio;
boolean_t have_lock, full;
l2arc_write_callback_t *cb;
zio_t *pio, *wzio;
- uint64_t guid = spa_guid(spa);
+ uint64_t guid = spa_
load_
guid(spa);
int try;
ASSERT(dev->l2ad_vdev != NULL);
int try;
ASSERT(dev->l2ad_vdev != NULL);