Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2098622ybg; Thu, 24 Oct 2019 04:49:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXT8Uz30cSHuap70osB9FGGDqXD8vvsAySX566Xk/6QWQeX6MuvRUsnk33PMn+68FHy1aZ X-Received: by 2002:a17:906:3f87:: with SMTP id b7mr36716561ejj.107.1571917791143; Thu, 24 Oct 2019 04:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571917791; cv=none; d=google.com; s=arc-20160816; b=M6qV70lI6feQ8yLc2jwI4t5aJVGTLDc1e+9I1H3sO9jd9U9WncgkdSDkjMsUmnQlG3 BAZLgZvuC4sD4i7AvmUEYBM6yRDURtQti0k8JKA+GGaafizOvhOFfQOG7CNpYwCzJiON KpPvSePr3SQrcBP42rgRY+69jEdTR7QG34mOgtNJq0Xb7lQ3QlOH8rNNsr9py1YH6rSM M3SQihAReE7WQuuSBdZSJG9HWSyz0Wlg17BTxwZGzFlID5DJqa3uPi6DrjQhC0RS7FP3 xiqNQJwguGFMGzNdArfYEr8W/LjCof2Iy9H8f9qOKuc3r8MuN3yKnepPCdBQ9axWAGHa b75Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bmTvX9FYbuC6QyH5/A2rAX1VxpAbPPYdTAP1tIxwh5s=; b=NKuYmlAMRbIToRrP9SFogl1K0JAInpe0hv4dSGVbDqKLg5zu4QtYh/2YYTDUfkwOhz QGNB+cGWKprgcgbn912NtoejtGk87k5aczcSozixeS3C2nYE0G27tojYGMuxP5JTpg2Z 2eu1z1uWxNDYdjh3o81AyG/ndB8H2tY+UgxYT1pO/Kdkzv1GdLQBk700E1fIJ6izVwqt ovMLjiXMvG9c7BIRCSLlS7530DMyweD2+M2cP39TvDHmIqdf8D8uhbJQpyb1sgW6qYHn RYJ8MRqsHDrTjoP7dHGaY6fxleUb6QfsI88yOD3kMKwUp6IseoH/Wve7zRm75XfzQ8PM nD0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si3915126edw.274.2019.10.24.04.49.27; Thu, 24 Oct 2019 04:49:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730727AbfJWRf2 (ORCPT + 99 others); Wed, 23 Oct 2019 13:35:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:46004 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730453AbfJWRf1 (ORCPT ); Wed, 23 Oct 2019 13:35:27 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8E590AD29; Wed, 23 Oct 2019 17:35:25 +0000 (UTC) Date: Wed, 23 Oct 2019 19:35:24 +0200 From: Michal Hocko To: Mike Christie Cc: Dave Chinner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, martin@urbackup.org, Damien.LeMoal@wdc.com Subject: Re: [PATCH] Add prctl support for controlling PF_MEMALLOC V2 Message-ID: <20191023173524.GM17610@dhcp22.suse.cz> References: <20191021214137.8172-1-mchristi@redhat.com> <20191022112446.GA8213@dhcp22.suse.cz> <5DAF2AA0.5030500@redhat.com> <20191022163310.GS9379@dhcp22.suse.cz> <20191022204344.GB2044@dread.disaster.area> <20191023071146.GE754@dhcp22.suse.cz> <5DB08D81.8050300@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5DB08D81.8050300@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 23-10-19 12:27:29, Mike Christie wrote: > On 10/23/2019 02:11 AM, Michal Hocko wrote: > > On Wed 23-10-19 07:43:44, Dave Chinner wrote: > >> On Tue, Oct 22, 2019 at 06:33:10PM +0200, Michal Hocko wrote: > > > > Thanks for more clarifiation regarding PF_LESS_THROTTLE. > > > > [...] > >>> PF_IO_FLUSHER would mean that the user > >>> context is a part of the IO path and therefore there are certain reclaim > >>> recursion restrictions. > >> > >> If PF_IO_FLUSHER just maps to PF_LESS_THROTTLE|PF_MEMALLOC_NOIO, > >> then I'm not sure we need a new definition. Maybe that's the ptrace > >> flag name, but in the kernel we don't need a PF_IO_FLUSHER process > >> flag... > > > > Yes, the internal implementation would do something like that. I was > > more interested in the user space visible API at this stage. Something > > generic enough because exporting MEMALLOC flags is just a bad idea IMHO > > (especially PF_MEMALLOC). > > Do you mean we would do something like: > > prctl() > .... > case PF_SET_IO_FLUSHER: > current->flags |= PF_MEMALLOC_NOIO; > .... yes, along with PF_LESS_THROTTLE. -- Michal Hocko SUSE Labs