Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1210922imm; Wed, 11 Jul 2018 20:15:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpemy72aEEe7PI6pEa9YLn536oBsPnmkl7Mflkf+Z/kDrNEcBDxj9781YqGiYzX9EjipSjLI X-Received: by 2002:a17:902:7248:: with SMTP id c8-v6mr512581pll.128.1531365310108; Wed, 11 Jul 2018 20:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531365310; cv=none; d=google.com; s=arc-20160816; b=O08GOVlqoUO4LZOxj3Fo317nXJDx7VAFPWQLY/fQAIiTEO6BYu2MIfC9az/7ahjQjJ FMEO0PHSS0J9s2f9DzJ1Hxt9Ltxo4RZ/3x3i6tzzTunKTS948j5J7KlXewxViDms4vdC bV52J/BQ/eW/Vv7sWmCAQ835Pt95SIFML4VGTMAIT5/VSH6VU45A7UHAHNNWguUOXXAh 9b4n6kqU5t4XzfSD3uPhY1nSGkhTCOMgljPtPxP6FXb2S8SIXNQTtobmfZVfSUP1H7Xt K6zZ4XeN3I7cMAym2exrfOz3ZkLgjAJIQ99/ykEdPq3/MrRQB+r9Kd+yp7+Kf2BfwIDB nVeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Gp7tHqAGCWAmABqzcrpCR3qiHm0sVZEwlUoIMOPzZ8A=; b=WxG5dovuiuqnsnwM3YBkzeUuPFfp99uAEwtN2TYBGzTz6DohUh5T4h2BFEdSywoZ9s fefnXxWCkSlrzo8cLP6NL59TJgN4rLHDtkitmeXozEkHtedekVAUa7j3HyYw9K0vwqT2 w9bJyWkXZdPy8JLBY6U4tiT7Y0/IIOrl8ad2A+V20pYlkcZqDnf5V6jP1C/qVPsxDRI6 8knp1GmY17u8UABYRwp1vGLAAs8PQdUZwIlQ3yA74S5ToQlHxBpmdRaUwxr3MmkuLAbH Yzll2HFBhyiA/UCOPxMho421YSPZCuvPn6lueZwDIVqRW+IIlpBz+/XRY4kFZyRuE+YH CaAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KQr2FEpn; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w61-v6si20236783plb.502.2018.07.11.20.14.55; Wed, 11 Jul 2018 20:15:10 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KQr2FEpn; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726639AbeGLC4H (ORCPT + 99 others); Wed, 11 Jul 2018 22:56:07 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:38046 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbeGLC4H (ORCPT ); Wed, 11 Jul 2018 22:56:07 -0400 Received: by mail-wm0-f68.google.com with SMTP id 69-v6so4354185wmf.3 for ; Wed, 11 Jul 2018 19:48:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Gp7tHqAGCWAmABqzcrpCR3qiHm0sVZEwlUoIMOPzZ8A=; b=KQr2FEpne5CAuFA3j56hHgrxU8RoUgqV7haEpF0z2jMXjvBL+hawjR65iwz+ZyCzmv Pl550l8qcJG+66XV6+J2agCgglbdABO3vPQf+zRwaBK55y8D+5CQww7MkUCqBLiJpVjj YWjNayGtfACiBWXEpHIlelgLGI17qKexbZPB2QNXqYB8ljlobgif8xiMWAB0DN5eJcEd 3w5hj8+5sXOtSGKMzpo4AbIffayzT1P2giyIf+nl5cg47rgWg9VRwc4K2yG2U3Ib/qpZ k5O62ZHX3J3Yh7PlxEmo1TJ9pJof5AqFrLJ6DrhlE3O3RYjFh7U9AugpA55hYg/Wq9wa 5vbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Gp7tHqAGCWAmABqzcrpCR3qiHm0sVZEwlUoIMOPzZ8A=; b=DskaohDGR6X0C1J3Bawvd3vJqXIEpC617wu9TdpXOg+VLnmiWhSk2/ISnUL0NiezRb Lt+CTY7IQ9Aco9lNEXKI4r5Kqwbr5lx/q55Z9XbOHOKXTrK1oZK0A25Yqb7Zl4Gd8LJi lC+8/lJksp25N6/CugecJ4HoXwYHs97eRbqRQ2iZ19ZfUCb1Xf9se0EQdut6XDOTLTxJ DQGRA/9RRqlIN+LB5EToIxYQyjub/Wl0Pk3oSK4Q1AfuPw1jUSw00FdYfD/BhgzVyjH8 v3le4ETvEOxCZfnLn5+QJUDPZk1ed7xgAd9CzR7tSCxzLtWeYfH0zws3S8mkSgoPOBpB iFqw== X-Gm-Message-State: AOUpUlEClvcqeT4C+vBKaVl2eu2Y4FbuJ8QZcTDL0L3OENbUMOhcrO+Y R/aoK5q8BHcO0XXaRktKpHx6bG8pWKluXapAHKo= X-Received: by 2002:a1c:6f44:: with SMTP id k65-v6mr92769wmc.19.1531363728324; Wed, 11 Jul 2018 19:48:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:61c1:0:0:0:0:0 with HTTP; Wed, 11 Jul 2018 19:48:47 -0700 (PDT) In-Reply-To: <20180711085407.GB20050@dhcp22.suse.cz> References: <20180709121956.20200-1-m.szyprowski@samsung.com> <20180709122019eucas1p2340da484acfcc932537e6014f4fd2c29~-sqTPJKij2939229392eucas1p2j@eucas1p2.samsung.com> <20180710095056.GE14284@dhcp22.suse.cz> <20180711085407.GB20050@dhcp22.suse.cz> From: Joonsoo Kim Date: Thu, 12 Jul 2018 11:48:47 +0900 Message-ID: Subject: Re: [PATCH 1/2] mm/cma: remove unsupported gfp_mask parameter from cma_alloc() To: Michal Hocko Cc: Marek Szyprowski , Linux Memory Management List , LKML , linux-arm-kernel@lists.infradead.org, linuxppc-dev , iommu@lists.linux-foundation.org, Andrew Morton , Michal Nazarewicz , Joonsoo Kim , Vlastimil Babka , Christoph Hellwig , Russell King , Catalin Marinas , Will Deacon , Paul Mackerras , Benjamin Herrenschmidt , Chris Zankel , Martin Schwidefsky , Joerg Roedel , Sumit Semwal , Robin Murphy , Laura Abbott , linaro-mm-sig@lists.linaro.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-07-11 17:54 GMT+09:00 Michal Hocko : > On Wed 11-07-18 16:35:28, Joonsoo Kim wrote: >> 2018-07-10 18:50 GMT+09:00 Michal Hocko : >> > On Tue 10-07-18 16:19:32, Joonsoo Kim wrote: >> >> Hello, Marek. >> >> >> >> 2018-07-09 21:19 GMT+09:00 Marek Szyprowski : >> >> > cma_alloc() function doesn't really support gfp flags other than >> >> > __GFP_NOWARN, so convert gfp_mask parameter to boolean no_warn parameter. >> >> >> >> Although gfp_mask isn't used in cma_alloc() except no_warn, it can be used >> >> in alloc_contig_range(). For example, if passed gfp mask has no __GFP_FS, >> >> compaction(isolation) would work differently. Do you have considered >> >> such a case? >> > >> > Does any of cma_alloc users actually care about GFP_NO{FS,IO}? >> >> I don't know. My guess is that cma_alloc() is used for DMA allocation so >> block device would use it, too. If fs/block subsystem initiates the >> request for the device, >> it would be possible that cma_alloc() is called with such a flag. >> Again, I don't know >> much about those subsystem so I would be wrong. > > The patch converts existing users and none of them really tries to use > anything other than GFP_KERNEL [|__GFP_NOWARN] so this doesn't seem to > be the case. Should there be a new user requiring more restricted > gfp_mask we should carefuly re-evaluate and think how to support it. One of existing user is general DMA layer and it takes gfp flags that is provided by user. I don't check all the DMA allocation sites but how do you convince that none of them try to use anything other than GFP_KERNEL [|__GFP_NOWARN]? Thanks.