From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A3DDCA9ECB for ; Thu, 31 Oct 2019 18:43:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E63DD20873 for ; Thu, 31 Oct 2019 18:43:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="peHYAPeX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E63DD20873 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9737B6B0005; Thu, 31 Oct 2019 14:43:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 922846B0006; Thu, 31 Oct 2019 14:43:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8398A6B0008; Thu, 31 Oct 2019 14:43:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0143.hostedemail.com [216.40.44.143]) by kanga.kvack.org (Postfix) with ESMTP id 643B16B0005 for ; Thu, 31 Oct 2019 14:43:50 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 046278249980 for ; Thu, 31 Oct 2019 18:43:50 +0000 (UTC) X-FDA: 76104953820.19.spade98_3e88ccfe5ab0e X-HE-Tag: spade98_3e88ccfe5ab0e X-Filterd-Recvd-Size: 4290 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Thu, 31 Oct 2019 18:43:49 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id u22so9847700qtq.13 for ; Thu, 31 Oct 2019 11:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Hfo2/9DpljbvAhB9xl0YdOSI7Py9wSatQChmRyBaX2Y=; b=peHYAPeXlBqrPFee2+Ck4DPkyTNSAkZMt4NL2IB8D3i6SnLsaxm94Z8WT/Pkw5KEmn XQGCo7nu0OykrB+FvY75HEtIXp5NbHuSrunM4BeNeexfSauFgmGxUac2SHFknPFaE+i1 vgQykTq0ATqdXnzwYyjinkYHm4bQvCo0KweOcK7sssmUK0rdQPBeFyebfxchH516hZ4h mkwcw3jbcwKYtyE7sSGzNcfEGhx34OqVuepXFnzOgV4AJfHsdWfDE+y8la5+R9D0wD0H ETxkg/gZeIaGqkAPuzTN9tqQitF72e8cRAgYe0QnO//swqQLt5dWnEceAKrcGgXsvX1i 8Ulw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Hfo2/9DpljbvAhB9xl0YdOSI7Py9wSatQChmRyBaX2Y=; b=QjgtrVGZO3k/hQoX3P34x1ru/RQun/hpK7oKYy8n9EhEYAU0y/FVW0ZaeproPC3j1w B+JuH0cHfKFSw44BgR5TjSVmny/iuVIHFDM8Cx+eeeBjXQUzLV/aUDDNtarju38ssuK9 nygs/zCjRrYBpikr3p3qPS+mGHYqQvg+rSUqT2C8w45sWMH8ZbgJp2vxxt7ENiaKPYdz CqRbjwrV/fw8Fcf+ntf8jRlGuKclFjHVe0BMYSFpT+6S+x0EborA2lTzqSITZQZvtOXc t5pBdtGH6AjCtcu+fNvCNrT8pc/Btqc08Tb4eZ8RtVc6l3LMBo94CaDPBbzc5iCwDmBn VZ0Q== X-Gm-Message-State: APjAAAVpMfXGtpRRfeOxEzPpZlpJ+HqE8yeCuaw34szTEzV5l+PbGYnW REyYeDlZfc0qgdk3enOovH4= X-Google-Smtp-Source: APXvYqySb6tIznbjqfsQ8WMDhIHY8G3NjOyExytgE1RmUg4EJoBT2Wq/6z6BRRe1QvcVE4Trsj5QDw== X-Received: by 2002:ac8:866:: with SMTP id x35mr6771728qth.90.1572547428789; Thu, 31 Oct 2019 11:43:48 -0700 (PDT) Received: from localhost ([2620:10d:c091:500::e44c]) by smtp.gmail.com with ESMTPSA id i75sm2451492qke.22.2019.10.31.11.43.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Oct 2019 11:43:48 -0700 (PDT) Date: Thu, 31 Oct 2019 11:43:46 -0700 From: Tejun Heo To: Shakeel Butt Cc: Eric Dumazet , Michal Hocko , "David S. Miller" , netdev@vger.kernel.org, Kernel Team , LKML , Josef Bacik , Jakub Kicinski , Johannes Weiner , Linux MM , Mel Gorman , Andrew Morton Subject: Re: [PATCH v2] net: fix sk_page_frag() recursion from memory reclaim Message-ID: <20191031184346.GM3622521@devbig004.ftw2.facebook.com> References: <20191019170141.GQ18794@devbig004.ftw2.facebook.com> <20191024205027.GF3622521@devbig004.ftw2.facebook.com> <11f688a6-0288-0ec4-f925-7b8f16ec011b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hello, On Thu, Oct 31, 2019 at 11:30:57AM -0700, Shakeel Butt wrote: > Basically what I wanted to say that MM treats PF_MEMALLOC as the > reclaim context while __GFP_MEMALLOC just tells to give access to the > reserves. As gfpflags_allow_blocking() can be used beyond net > subsystem, my only concern is its potential usage under PF_MEMALLOC > context but without __GFP_MEMALLOC. Yeah, PF_MEMALLOC is likely the better condition to check here as we primarily want to know whether %current might be recursing and that should be indicated reliably with PF_MEMALLOC. Wanna prep a patch for it? Thanks. -- tejun