Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp962636rwr; Wed, 3 May 2023 08:25:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6PZkixMuZX/UUSCl5TIAFNQI+9DysSmtgvZj9IhoadTkaBzzsqovlWChTZOfP79F1VM/CT X-Received: by 2002:a05:6a20:1610:b0:f6:15f3:ca21 with SMTP id l16-20020a056a20161000b000f615f3ca21mr7793579pzj.3.1683127526695; Wed, 03 May 2023 08:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683127526; cv=none; d=google.com; s=arc-20160816; b=WoPYyKbfXw+s0Z5UX+IqIDXyzmR3WVIIHb960XEOyNAKHbz4rpw6VQz94ZcBxJOMtb qLhWIcrpCmQrZVmh/R4IEf5lwPidTlp4ni+kvfBPzB5qNSmTHAXAr6oS3zPTK76D+0au 0Nz6FytmbV8AfGC2XEUc82P5vQ7pdRS/SIgwIb9uAnaIA6GKHPJeUBRx8AS7U/G54bWY o7GZM9ZCz8vQpl3j0q6fmUBoq2Tai/mwGU6OkjQArJ+v1SN8ijFNY8YZUzznc1+yd7Nc fJOrEbo6sJMMlPUm3Fp0gfwAVpMyM22wqRIyt2dlJc8+sx2USkKjfLBhPvZMU7Wc595C d2qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=3u3xUQKsQtY5MjJU7KWdFVlKdUwGfS6WMFqIdWoJCIo=; b=0ue43IJR+of+6e8yLK3Yr/8T+/A3jBk9QtDWTaUo8lqXDluq15NWGT9TEtplYTVkF0 NqODmo5hnRGHTYgbKXFSkNINHnkWLDmSMJo15LVmpg0R55klnYltyBLaJuY9wfYntXYx CMGTdtqwHLKy8k19SJCP4CbYXb+r8THodbpaEgphazRJyHvROYpGMqi8ZyboGdi9kd/G cfwMw5najfELajkXNXzzv0Lc5BhxSyVGVnpm8vNIZdak8ltiaeIBrVUnru0F+u3yTKdW Nk5MizIVofgEVi+0mbNxX22iHFOTqDgEWdg6Xv+bfHtM7y52rfXDTGDGtfkvis2EGIqY lDoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=unFkvF+6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h5-20020a625305000000b0063d35b6d9ebsi33252116pfb.368.2023.05.03.08.25.14; Wed, 03 May 2023 08:25:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=unFkvF+6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbjECPYg (ORCPT + 99 others); Wed, 3 May 2023 11:24:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230257AbjECPYe (ORCPT ); Wed, 3 May 2023 11:24:34 -0400 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6901A5593 for ; Wed, 3 May 2023 08:24:32 -0700 (PDT) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-55a64f0053fso48983927b3.3 for ; Wed, 03 May 2023 08:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683127471; x=1685719471; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3u3xUQKsQtY5MjJU7KWdFVlKdUwGfS6WMFqIdWoJCIo=; b=unFkvF+6wudO45usQ0U6AfJIfqhGP+H5/IVYvEVNkvB69qXh+JOZzYWL6W8iypwR8u WXtxZSQf4t68zEHXsPc28NiwHPUvvwS/M344xQ3tBObhdP7U9FItGEykPkPqu+eEbFFp okusA4UwcrZWf8Z51Zm29/RE04pDrtNIp/vD2aJp+XpBdU2UkRkKKny9uq/isdNkl+oO Skjuy9Oo1eMbcdvkjUdB3P7K+oZHaS/9IHtfkJQayp0An2kmfxp7oACjbZtN8XRdwT2w lxjzvHFT+zOFmdZqKIHE6BDxnTC8QY7tAueSdS/QBzC33/doZv3G/USW3EuK7WLdlbGW qF+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683127471; x=1685719471; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3u3xUQKsQtY5MjJU7KWdFVlKdUwGfS6WMFqIdWoJCIo=; b=FFeNVxs9lULRJLm+NPehFkLJYHgVZe4wqFKoJI3QLqEuJuZian85M9xVftPKlrl1J3 csi0ttMIQLit2A0ViU9UIH2IhXwfJwavOar2miMJdnJ3lLz2xHrXu/kgFgzt6BzXmMom asfGHtkahop4EcXH4DuvBNusbLRh3dTXRMjmIvlk2Rm3vkLS2fNFzqX3s8djJF0uDigs KlyVBgkBbzn2LM6WjUqp8mbF4NPaeUgb3SZXjrBLvyGw9naOn1ssdxf4IUhNXVe1ciNZ ogB2trMElhD8abuh8fAAlzmPL4w6Oevu70GbVgWetBZW7BGdD0ckvBjjCSJH69oPNurJ taXg== X-Gm-Message-State: AC+VfDxMhJSNavM4KIEhyka501AZ5SxMw3rD78/jUnBgZlJ1M0aXS3nN cCVavKqV6iCqALM1LNPPTNSM3M0d2F1Jm6sW6hR6lg== X-Received: by 2002:a0d:e296:0:b0:55a:4109:7f5a with SMTP id l144-20020a0de296000000b0055a41097f5amr11315408ywe.12.1683127470672; Wed, 03 May 2023 08:24:30 -0700 (PDT) MIME-Version: 1.0 References: <20230501165450.15352-1-surenb@google.com> <20230501165450.15352-36-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Wed, 3 May 2023 08:24:19 -0700 Message-ID: Subject: Re: [PATCH 35/40] lib: implement context capture support for tagged allocations To: Michal Hocko Cc: akpm@linux-foundation.org, kent.overstreet@linux.dev, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 3, 2023 at 12:39=E2=80=AFAM Michal Hocko wrot= e: > > On Mon 01-05-23 09:54:45, Suren Baghdasaryan wrote: > [...] > > +struct codetag_ctx *alloc_tag_create_ctx(struct alloc_tag *tag, size_t= size) > > +{ > > + struct alloc_call_ctx *ac_ctx; > > + > > + /* TODO: use a dedicated kmem_cache */ > > + ac_ctx =3D kmalloc(sizeof(struct alloc_call_ctx), GFP_KERNEL); > > You cannot really use GFP_KERNEL here. This is post_alloc_hook path and > that has its own gfp context. I missed that. Would it be appropriate to use the gfp_flags parameter of post_alloc_hook() here? > -- > Michal Hocko > SUSE Labs