From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f199.google.com (mail-qk0-f199.google.com [209.85.220.199]) by kanga.kvack.org (Postfix) with ESMTP id B21BE831F4 for ; Mon, 22 May 2017 08:01:00 -0400 (EDT) Received: by mail-qk0-f199.google.com with SMTP id w131so54088087qka.5 for ; Mon, 22 May 2017 05:01:00 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id d3si17561570qka.266.2017.05.22.05.00.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 May 2017 05:00:59 -0700 (PDT) Date: Mon, 22 May 2017 08:00:11 -0400 (EDT) From: Mikulas Patocka Subject: Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() In-Reply-To: <20170522093725.GF8509@dhcp22.suse.cz> Message-ID: References: <20170518185040.108293-1-junaids@google.com> <20170518190406.GB2330@dhcp22.suse.cz> <1508444.i5EqlA1upv@js-desktop.svl.corp.google.com> <20170519074647.GC13041@dhcp22.suse.cz> <20170522093725.GF8509@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Junaid Shahid , David Rientjes , Alasdair Kergon , Mike Snitzer , Andrew Morton , linux-mm@kvack.org, andreslc@google.com, gthelen@google.com, vbabka@suse.cz, linux-kernel@vger.kernel.org On Mon, 22 May 2017, Michal Hocko wrote: > On Fri 19-05-17 19:43:23, Mikulas Patocka wrote: > > > > > > On Fri, 19 May 2017, Michal Hocko wrote: > > > > > On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > > > > (Adding back the correct linux-mm email address and also adding linux-kernel.) > > > > > > > > On Thursday, May 18, 2017 01:41:33 PM David Rientjes wrote: > > > [...] > > > > > Let's ask Mikulas, who changed this from PF_MEMALLOC to __GFP_HIGH, > > > > > assuming there was a reason to do it in the first place in two different > > > > > ways. > > > > > > Hmm, the old PF_MEMALLOC used to have the following comment > > > /* > > > * Trying to avoid low memory issues when a device is > > > * suspended. > > > */ > > > > > > I am not really sure what that means but __GFP_HIGH certainly have a > > > different semantic than PF_MEMALLOC. The later grants the full access to > > > the memory reserves while the prior on partial access. If this is _really_ > > > needed then it deserves a comment explaining why. > > > -- > > > Michal Hocko > > > SUSE Labs > > > > Sometimes, I/O to a device mapper device is blocked until the userspace > > daemon dmeventd does some action (for example, when dm-mirror leg fails, > > dmeventd needs to mark the leg as failed in the lvm metadata and then > > reload the device). > > > > The dmeventd daemon mlocks itself in memory so that it doesn't generate > > any I/O. But it must be able to call ioctls. __GFP_HIGH is there so that > > the ioctls issued by dmeventd have higher chance of succeeding if some I/O > > is blocked, waiting for dmeventd action. It reduces the possibility of > > low-memory-deadlock, though it doesn't eliminate it entirely. > > So what happens if the memory reserves are depleted. Do we deadlock? Yes, it will deadlock. > Why is OOM killer insufficient to allow the further progress? I don't know if the OOM killer will or won't be triggered in this situation, it depends on the people who wrote the OOM killer. > -- > Michal Hocko > SUSE Labs Mikulas -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org