Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch
This commit is contained in:
commit
4f71b314a7
|
@ -1801,9 +1801,11 @@ arc_shrink(void)
|
||||||
static int
|
static int
|
||||||
arc_reclaim_needed(void)
|
arc_reclaim_needed(void)
|
||||||
{
|
{
|
||||||
uint64_t extra;
|
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
|
#ifdef HAVE_SPL
|
||||||
|
/* FIXME: Linux VM integration */
|
||||||
|
#else
|
||||||
|
uint64_t extra;
|
||||||
|
|
||||||
if (needfree)
|
if (needfree)
|
||||||
return (1);
|
return (1);
|
||||||
|
@ -1848,12 +1850,12 @@ arc_reclaim_needed(void)
|
||||||
if (btop(vmem_size(heap_arena, VMEM_FREE)) <
|
if (btop(vmem_size(heap_arena, VMEM_FREE)) <
|
||||||
(btop(vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC)) >> 2))
|
(btop(vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC)) >> 2))
|
||||||
return (1);
|
return (1);
|
||||||
#endif
|
#endif /* __i386 */
|
||||||
|
#endif /* HAVE_SPL */
|
||||||
#else
|
#else
|
||||||
if (spa_get_random(100) == 0)
|
if (spa_get_random(100) == 0)
|
||||||
return (1);
|
return (1);
|
||||||
#endif
|
#endif /* _KERNEL */
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1867,6 +1869,7 @@ arc_kmem_reap_now(arc_reclaim_strategy_t strat)
|
||||||
extern kmem_cache_t *zio_data_buf_cache[];
|
extern kmem_cache_t *zio_data_buf_cache[];
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
|
#ifndef HAVE_SPL
|
||||||
if (arc_meta_used >= arc_meta_limit) {
|
if (arc_meta_used >= arc_meta_limit) {
|
||||||
/*
|
/*
|
||||||
* We are exceeding our meta-data cache limit.
|
* We are exceeding our meta-data cache limit.
|
||||||
|
@ -1874,13 +1877,14 @@ arc_kmem_reap_now(arc_reclaim_strategy_t strat)
|
||||||
*/
|
*/
|
||||||
dnlc_reduce_cache((void *)(uintptr_t)arc_reduce_dnlc_percent);
|
dnlc_reduce_cache((void *)(uintptr_t)arc_reduce_dnlc_percent);
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_SPL */
|
||||||
#if defined(__i386)
|
#if defined(__i386)
|
||||||
/*
|
/*
|
||||||
* Reclaim unused memory from all kmem caches.
|
* Reclaim unused memory from all kmem caches.
|
||||||
*/
|
*/
|
||||||
kmem_reap();
|
kmem_reap();
|
||||||
#endif
|
#endif /* __i386 */
|
||||||
#endif
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* An aggressive reclamation will shrink the cache size as well as
|
* An aggressive reclamation will shrink the cache size as well as
|
||||||
|
@ -2031,6 +2035,7 @@ arc_evict_needed(arc_buf_contents_t type)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
|
#ifndef HAVE_SPL
|
||||||
/*
|
/*
|
||||||
* If zio data pages are being allocated out of a separate heap segment,
|
* If zio data pages are being allocated out of a separate heap segment,
|
||||||
* then enforce that the size of available vmem for this area remains
|
* then enforce that the size of available vmem for this area remains
|
||||||
|
@ -2040,7 +2045,8 @@ arc_evict_needed(arc_buf_contents_t type)
|
||||||
vmem_size(zio_arena, VMEM_FREE) <
|
vmem_size(zio_arena, VMEM_FREE) <
|
||||||
(vmem_size(zio_arena, VMEM_ALLOC) >> 5))
|
(vmem_size(zio_arena, VMEM_ALLOC) >> 5))
|
||||||
return (1);
|
return (1);
|
||||||
#endif
|
#endif /* HAVE_SPL */
|
||||||
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
if (arc_reclaim_needed())
|
if (arc_reclaim_needed())
|
||||||
return (1);
|
return (1);
|
||||||
|
@ -3262,6 +3268,7 @@ arc_memory_throttle(uint64_t reserve, uint64_t txg)
|
||||||
* the arc is already going to be evicting, so we just want to
|
* the arc is already going to be evicting, so we just want to
|
||||||
* continue to let page writes occur as quickly as possible.
|
* continue to let page writes occur as quickly as possible.
|
||||||
*/
|
*/
|
||||||
|
#ifndef HAVE_SPL
|
||||||
if (curproc == proc_pageout) {
|
if (curproc == proc_pageout) {
|
||||||
if (page_load > MAX(ptob(minfree), available_memory) / 4)
|
if (page_load > MAX(ptob(minfree), available_memory) / 4)
|
||||||
return (ERESTART);
|
return (ERESTART);
|
||||||
|
@ -3273,6 +3280,7 @@ arc_memory_throttle(uint64_t reserve, uint64_t txg)
|
||||||
ARCSTAT_INCR(arcstat_memory_throttle_count, 1);
|
ARCSTAT_INCR(arcstat_memory_throttle_count, 1);
|
||||||
return (EAGAIN);
|
return (EAGAIN);
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_SPL */
|
||||||
page_load = 0;
|
page_load = 0;
|
||||||
|
|
||||||
if (arc_size > arc_c_min) {
|
if (arc_size > arc_c_min) {
|
||||||
|
|
Loading…
Reference in New Issue