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=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 D7931C433E1 for ; Tue, 21 Jul 2020 03:33:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 942FE2080D for ; Tue, 21 Jul 2020 03:33:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N0xmZDOq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 942FE2080D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 129B56B0023; Mon, 20 Jul 2020 23:33:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0D9FA6B0025; Mon, 20 Jul 2020 23:33:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F0A5D6B0026; Mon, 20 Jul 2020 23:33:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0102.hostedemail.com [216.40.44.102]) by kanga.kvack.org (Postfix) with ESMTP id DC4556B0023 for ; Mon, 20 Jul 2020 23:33:35 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8307FBE17D14 for ; Tue, 21 Jul 2020 03:33:35 +0000 (UTC) X-FDA: 77060663190.07.fact56_1111b0b26f2a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 5909418022BCC for ; Tue, 21 Jul 2020 03:33:35 +0000 (UTC) X-HE-Tag: fact56_1111b0b26f2a X-Filterd-Recvd-Size: 4560 Received: from mail-qv1-f68.google.com (mail-qv1-f68.google.com [209.85.219.68]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Tue, 21 Jul 2020 03:33:34 +0000 (UTC) Received: by mail-qv1-f68.google.com with SMTP id dm12so8727027qvb.9 for ; Mon, 20 Jul 2020 20:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=cLD63HVz7cMknBL4wWGEVVq5fT472O42ahxwzC+ygv8=; b=N0xmZDOqHUb4jVCuhhRlxsAawQPNEPouqOJF666NlI5J9shQVxg6EIlorfO7ROp0qj +5Un5Mkb2rPtuN83IBOozQn8rvDWAxjrxBA4diI1gJO7RxkozJuft6dwTe6NcQnewzK7 VaqKn0Q4Lx9lDxu+LeIrK0ozQA5cj2Fo5OHYMTyjc1r11gr7ucHVB+ooOhsuzMJRL0F9 aNOre2/3TcBeHKbL1wlfCFfHThc76jPki/cXTjniK+IZ0ht5aCHqqFf3a2n1fkJI+FgR seLq86CShgp68h22vbzIDmUhml7V6MlU1mPXGa4McU3t2iT8AKhI0Ja5wJKvsgqN8bh4 8Jug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cLD63HVz7cMknBL4wWGEVVq5fT472O42ahxwzC+ygv8=; b=mSOkMsoEhssb6Yl1j0zNGYNrRqFjlJRBxWLAHHp/p5f73614E4BWE1ZCksSL4ofFmU YP+KVe2omvHYPR9vSW+Kb2G0Gu+Rc96NhRFIa8eliezghJpvni+HW9HD2PnMWVqz5IAb aQduFYVXazoPCpHUWx9D8KZpknZS2urJ7PIh1V4xxhsUtbMLkjTZSyyw4HYkjxCoi6I8 DC23WLUyg5o0hYgh+KNpIRBnGD8MGQVEXk1wG0APBlFJQd/hI2DUaiqF0KPn243BqPJF Z69+BkdPfHwFAhy5Lx8rufgVgS0x+/FsJUNtURXBXSn+YFSiqMCEbpqglBcwYt8kX3Uu t6dA== X-Gm-Message-State: AOAM531RwLNSH0P6MqWK/5VVLpjw8hizoZU/Ylkq3YjdB8h8onszui7W BMfK7/YUwdIivWU6/0/STizFniyjvO1LZUtB2oM= X-Google-Smtp-Source: ABdhPJwtURi/POzxLcVWiStZdyZxxmIbAnE33dRmIQI8XYzmQzbfylxBKwPnoJcte3kMI579qVquVMZKWd7pkAmJb7E= X-Received: by 2002:ad4:4732:: with SMTP id l18mr23948292qvz.208.1595302414313; Mon, 20 Jul 2020 20:33:34 -0700 (PDT) MIME-Version: 1.0 References: <1595220978-9890-1-git-send-email-iamjoonsoo.kim@lge.com> <20200720162313.1381e1ec82daa6a92ae4cda7@linux-foundation.org> In-Reply-To: <20200720162313.1381e1ec82daa6a92ae4cda7@linux-foundation.org> From: Joonsoo Kim Date: Tue, 21 Jul 2020 12:33:23 +0900 Message-ID: Subject: Re: [PATCH v2 1/4] mm/page_alloc: fix non cma alloc context To: Andrew Morton Cc: Linux Memory Management List , LKML , kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Michal Hocko , "Aneesh Kumar K . V" , Joonsoo Kim , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 5909418022BCC X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: 2020=EB=85=84 7=EC=9B=94 21=EC=9D=BC (=ED=99=94) =EC=98=A4=EC=A0=84 8:23, A= ndrew Morton =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84= =B1: > > On Mon, 20 Jul 2020 13:56:15 +0900 js1304@gmail.com wrote: > > > Currently, preventing cma area in page allocation is implemented by usi= ng > > current_gfp_context(). However, there are two problems of this > > implementation. > > > > First, this doesn't work for allocation fastpath. In the fastpath, > > original gfp_mask is used since current_gfp_context() is introduced in > > order to control reclaim and it is on slowpath. > > Second, clearing __GFP_MOVABLE has a side effect to exclude the memory > > on the ZONE_MOVABLE for allocation target. > > > > To fix these problems, this patch changes the implementation to exclude > > cma area in page allocation. Main point of this change is using the > > alloc_flags. alloc_flags is mainly used to control allocation so it fit= s > > for excluding cma area in allocation. > > > > Fixes: d7fefcc8de91 (mm/cma: add PF flag to force non cma alloc) > > Cc: > > This patch is against linux-next (or -mm) and has a lot of issues > applying to mainline. If we indeed wish to backport it to -stable, it > should be against mainline, please. I sent a revised patch against the mainline a minute ago. Subject and commi= t description is updated. Thanks.