Return-Path: Subject: Re: [PATCH RESEND v2 2/2] blk-mq: Avoid memory reclaim when remapping queues To: Gabriel Krisman Bertazi References: <1481038304-22502-1-git-send-email-krisman@linux.vnet.ibm.com> <1481038304-22502-2-git-send-email-krisman@linux.vnet.ibm.com> Cc: wenxiong@linux.vnet.ibm.com, gpiccoli@linux.vnet.ibm.com, hch@infradead.org, Brian King , Douglas Miller , linux-block@vger.kernel.org, linux-scsi@vger.kernel.org From: Jens Axboe Message-ID: Date: Wed, 14 Dec 2016 08:14:26 -0700 MIME-Version: 1.0 In-Reply-To: <1481038304-22502-2-git-send-email-krisman@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 List-ID: On 12/06/2016 08:31 AM, Gabriel Krisman Bertazi wrote: > While stressing memory and IO at the same time we changed SMT settings, > we were able to consistently trigger deadlocks in the mm system, which > froze the entire machine. > > I think that under memory stress conditions, the large allocations > performed by blk_mq_init_rq_map may trigger a reclaim, which stalls > waiting on the block layer remmaping completion, thus deadlocking the > system. The trace below was collected after the machine stalled, > waiting for the hotplug event completion. > > The simplest fix for this is to make allocations in this path > non-reclaimable, with GFP_NOIO. With this patch, We couldn't hit the > issue anymore. This looks fine. -- Jens Axboe