lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 15 Nov 2019 13:13:03 -0800
From:   Joe Perches <joe@...ches.com>
To:     Qian Cai <cai@....pw>, jroedel@...e.de
Cc:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu/iova: silence warnings under memory pressure

On Fri, 2019-11-15 at 15:50 -0500, Qian Cai wrote:
> When running heavy memory pressure workloads, this 5+ old system is
> throwing endless warnings below because disk IO is too slow to recover
> from swapping. Since the volume from alloc_iova_fast() could be large,
> once it calls printk(), it will trigger disk IO (writing to the log
> files) and pending softirqs which could cause a loop and no progress
> from memory reclaim for days.
[]
> diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
[]
> @@ -233,7 +233,7 @@ static int __alloc_and_insert_iova_range(struct iova_domain *iovad,
>  
>  struct iova *alloc_iova_mem(void)
>  {
> -	return kmem_cache_alloc(iova_cache, GFP_ATOMIC);
> +	return kmem_cache_alloc(iova_cache, GFP_ATOMIC | __GFP_NOWARN);
>  }
>  EXPORT_SYMBOL(alloc_iova_mem);

Is notification ever useful?

If so, maybe something like:

struct iova *alloc_iova_mem(void)
{
	void *mem = kmem_cache_alloc(iova_cache, GFP_ATOMIC | __GFP_NOWARN)_

	WARN_RATELIMIT(!mem, "%s: unable to alloc cache\n", __func__);

	return mem;
}

or maybe use printk_deferred or prink_deferred_once

?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ