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:	Thu, 3 Dec 2015 21:43:13 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	Ulrich Obergfell <uobergfe@...hat.com>,
	Ingo Molnar <mingo@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH] workqueue: warn if memory reclaim tries to flush
 !WQ_MEM_RECLAIM workqueue

On Thu, Dec 03, 2015 at 02:26:16PM -0500, Tejun Heo wrote:
> +	WARN_ONCE(current->flags & PF_MEMALLOC,

I'm not sure about using PF_MEMALLOC for detecting reclaim. There appear
to be more sites setting this than reclaim. See:

drivers/block/nbd.c:	current->flags |= PF_MEMALLOC;
drivers/mmc/card/queue.c:	current->flags |= PF_MEMALLOC;
drivers/mtd/nand/nandsim.c:	current->flags |= PF_MEMALLOC;
drivers/scsi/iscsi_tcp.c:	current->flags |= PF_MEMALLOC;
drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h:#define memory_pressure_set() do { current->flags |= PF_MEMALLOC; } while (0)
fs/cifs/connect.c:	current->flags |= PF_MEMALLOC;
fs/xfs/libxfs/xfs_btree.c:		new_pflags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD;
fs/xfs/xfs_trans_ail.c:	current->flags |= PF_MEMALLOC;
include/linux/sched.h:	current->flags |= PF_MEMALLOC_NOIO;
mm/page_alloc.c:	current->flags |= PF_MEMALLOC;
mm/page_alloc.c:	current->flags |= PF_MEMALLOC;
mm/vmscan.c:	tsk->flags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD;
mm/vmscan.c:	p->flags |= PF_MEMALLOC;
mm/vmscan.c:	p->flags |= PF_MEMALLOC | PF_SWAPWRITE;
net/core/dev.c:		current->flags |= PF_MEMALLOC;
net/core/sock.c:	current->flags |= PF_MEMALLOC;


The actual reclaim sites in page_alloc and vmscan set
current->reclaim_state. So testing against that might be more accurate.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ