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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 7186CC2BA2B for ; Wed, 15 Apr 2020 07:02:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3CCB920768 for ; Wed, 15 Apr 2020 07:02:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CCB920768 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 DBDB28E0003; Wed, 15 Apr 2020 03:02:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D6E008E0001; Wed, 15 Apr 2020 03:02:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C83628E0003; Wed, 15 Apr 2020 03:02:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0163.hostedemail.com [216.40.44.163]) by kanga.kvack.org (Postfix) with ESMTP id AD38B8E0001 for ; Wed, 15 Apr 2020 03:02:32 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 65804181AEF10 for ; Wed, 15 Apr 2020 07:02:32 +0000 (UTC) X-FDA: 76709196144.27.sense55_16228010c1b1a X-HE-Tag: sense55_16228010c1b1a X-Filterd-Recvd-Size: 2795 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Apr 2020 07:02:31 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id x4so16072914wmj.1 for ; Wed, 15 Apr 2020 00:02:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=YAjVwOW5+MAEVGUZITzA9KP2ft9GY7dJC9IkrG7J3Iw=; b=TlAXVd9akxpetDvptVTt2a9t+5B3Swcn7WUNvGLJ0XI3UOJOjEpNdok720U0cH3xzi kYsWF8g299BuAU3N2duVQ4LueSqPioszLw4IMQyeBbS66gymy0elkfZlWxvqyaLxggeV ep6r83/14/IINp0MaMtByN9lZ7Z9xxSQl9Y0nar8enWkyF20yzvyQ7L8dawPLPoCAoFs jg0txi84E5io2w0aTQS/BPcireymU5TovhkNG3Ii1eJkUDEYgUiKsuedqVOBUx+x4GsS sp2L3GKbQ+BcBYGXs445jrsomnT/8lJ5I/sGydWDEKuDUGtAFzEkhW7Nlc54ZKjpPVgJ RmkA== X-Gm-Message-State: AGi0PuaFh//GtDYvqk6HImZeNiwosuPuJzH2KPHWo1mJ/mFjtoEbsrjh 2oCKlvNYpfwluNZo3FN2kcc= X-Google-Smtp-Source: APiQypI5HqG7twtnkieJtfmzbu1uiIIPqFIE3j63CH5pDM0tP9ghY6y06m4sbK1+ERNGQzO0AIfQdQ== X-Received: by 2002:a7b:c401:: with SMTP id k1mr3551702wmi.152.1586934150877; Wed, 15 Apr 2020 00:02:30 -0700 (PDT) Received: from localhost (ip-37-188-180-223.eurotel.cz. [37.188.180.223]) by smtp.gmail.com with ESMTPSA id g6sm2960436wrw.34.2020.04.15.00.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 00:02:30 -0700 (PDT) Date: Wed, 15 Apr 2020 09:02:28 +0200 From: Michal Hocko To: Christoph Hellwig , "Darrick J. Wong" Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, LKML Subject: implicit AOP_FLAG_NOFS for grab_cache_page_write_begin Message-ID: <20200415070228.GW4629@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: Hi, I have just received a bug report about memcg OOM [1]. The underlying issue is memcg specific but the stack trace made me look at the write(2) patch and I have noticed that iomap_write_begin enforces AOP_FLAG_NOFS which means that all the page cache that has to be allocated is GFP_NOFS. What is the reason for this? Do all filesystems really need the reclaim protection? I was hoping that those filesystems which really need NOFS context would be using the scope API (memalloc_nofs_{save,restore}. Could you clarify please? [1] http://lkml.kernel.org/r/20200414212558.58eaab4de2ecf864eaa87e5d@linux-foundation.org -- Michal Hocko SUSE Labs