Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp126659rbb; Fri, 23 Feb 2024 14:24:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWb4xFqk1VV+rVakO0TlNempiH7xMlIQdFtrMXI171NkNSfKBacuvKv/pucNuEQl3y+1F3U+Tf2a/wz+fz8xENo0B7CRRwqCEUF8Gz/4w== X-Google-Smtp-Source: AGHT+IHudts1UtbRbAfPs0QVTmfvJ1z961dDJXR2EMCt7jPLIyVhYMEVbBLfZWZScuMKc24cEiOP X-Received: by 2002:a05:6a00:9398:b0:6e4:5b13:e6fd with SMTP id ka24-20020a056a00939800b006e45b13e6fdmr1074164pfb.16.1708727099498; Fri, 23 Feb 2024 14:24:59 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i5-20020a639d05000000b005dc785e4a28si12819646pgd.30.2024.02.23.14.24.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 14:24:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20230601 header.b=VdEii+wV; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-79244-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79244-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=REJECT dis=REJECT) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7C4A0289F90 for ; Fri, 23 Feb 2024 22:18:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32ED014DFC1; Fri, 23 Feb 2024 22:18:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="VdEii+wV" Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53FA21493B4 for ; Fri, 23 Feb 2024 22:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708726680; cv=none; b=UeR7cWRkpMt38ykoucy0g7705Ats/t9C3khJUC74V8EJbnMC9RDIeeCy8gg3ay5nY6IecUhMz/7BrP4avjdbFxYMTy7dwoQx+fDwuxcY58obUfDyE8T8ScLfqxejKJeczImvesYMe0Yl0j4Aymw0bj/SiOPFClCk5EfzLqGeWr8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708726680; c=relaxed/simple; bh=mr+d1THQdIOXLBHXtZjKUSDXbb7TH7vTqrSqao2j71w=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Z96UKsgywOr8AKAXGQ5zSCHLakTHk7+nrg/v9PkWVPVENovqiK4rZrtr5sbiueQ//xBHrCKhHCPL2NoE+Jo9DCac2CUfyFTPZ+NcfBQECA5ZqLeqIWn30GWoSjAt3zroc+kZZOEjwl07slbgOg5hSwTeuPpQuMnjEe7hGH5cjTI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=VdEii+wV; arc=none smtp.client-ip=209.85.128.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-607f8894550so11466057b3.1 for ; Fri, 23 Feb 2024 14:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708726677; x=1709331477; darn=vger.kernel.org; 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=mr+d1THQdIOXLBHXtZjKUSDXbb7TH7vTqrSqao2j71w=; b=VdEii+wVRnJp1mt3DLFbLstJLZ/qohvz+uwS06r5/nk3fYwfMxW+/vdbORHgEMfQ6V //+/+IhByApeXKiHe8wSxfYEuEZYIUPOnqOQZs/vLMV8SWswH8kbRMouhgqB75Ssf/uE 9wzrB8/2WIi0puq4JAx0PnY9sMr3J/BpLlubAEBBrGUIz0LYmGSTC6ovFKL/TaZ2FTAJ WR9c2RUwFoRHwqV7zoI6oijiyxTF6+ZGSqnwBQo20sbR2jP6ux0HC+h2PwG3qMs7sKSd R0qd+leXxrawGLgwD1vKL0dy24+1d1jG4QB4Vav+gUykapzedxDSuQOBul5mVndE2dZg TFTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708726677; x=1709331477; 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=mr+d1THQdIOXLBHXtZjKUSDXbb7TH7vTqrSqao2j71w=; b=gmHWxMxwl1hBOLiNvNWZRMfOwiZWIdg0NUNUxLTXd7rqBXCaQANZdTiaAmRmuQqUqA 3X8gf6H+KD3NNNxwcoQgxB9FyGNsrTTIZ13Db+c9TbFnVSFKbb4xaiPj/tgN8ujc9iN0 N+f+g+sn+7CmxU9WazAYFMJrth4a9E3u0otG+BtDDHych5ATJde6NgHA8cJYmPFdgbFI xzVW8QYktDcTyi21LW4MN+O9VbV7A+Dq5ip53E9M2Pro0sq3fjRJM8+5KZHMbxr3Cv8f 3pyAVBNByel1HKXLZhnVMZlIHer9UphJrIgStbDb8ZBLUkdomlLcv6fSP8RQllYcquLp /A4g== X-Forwarded-Encrypted: i=1; AJvYcCVoUdRMjFtc198VzBVdLOIRksZw+b0bM7bP9s0pexwbaQyF6oBZSKgon2Y+oLEmpX+V/SwJTU088FpYJwci5pfN2grnE4SLQs1tgwab X-Gm-Message-State: AOJu0YzqRVpdRzWq9DkXP4CBnXDTrb1p/j6c5KtF/pmeAAxbx+jTWm1C wkAeiokonRZ3eVk80Y9VuCO0Cx8YP46OIJl9C4F7NznQPvqUDut+wCeUVzUbJGRqLWiJdXH81ob 5uQfwxbOr/DdbnU9zKWf9kLvUNwRGF1WtqHt2 X-Received: by 2002:a25:a427:0:b0:dc7:47b7:9053 with SMTP id f36-20020a25a427000000b00dc747b79053mr1214318ybi.15.1708726677063; Fri, 23 Feb 2024 14:17:57 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240221194052.927623-1-surenb@google.com> <20240221194052.927623-25-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Fri, 23 Feb 2024 14:17:44 -0800 Message-ID: Subject: Re: [PATCH v4 24/36] rust: Add a rust helper for krealloc() To: Alice Ryhl Cc: akpm@linux-foundation.org, kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.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, vvvvvv@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, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , rust-for-linux@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 22, 2024 at 2:00=E2=80=AFAM Alice Ryhl w= rote: > > On Wed, Feb 21, 2024 at 8:41=E2=80=AFPM Suren Baghdasaryan wrote: > > > > From: Kent Overstreet > > > > Memory allocation profiling is turning krealloc() into a nontrivial > > macro - so for now, we need a helper for it. > > > > Until we have proper support on the rust side for memory allocation > > profiling this does mean that all Rust allocations will be accounted to > > the helper. > > > > Signed-off-by: Kent Overstreet > > Cc: Miguel Ojeda > > Cc: Alex Gaynor > > Cc: Wedson Almeida Filho > > Cc: Boqun Feng > > Cc: Gary Guo > > Cc: "Bj=C3=B6rn Roy Baron" > > Cc: Benno Lossin > > Cc: Andreas Hindborg > > Cc: Alice Ryhl > > Cc: rust-for-linux@vger.kernel.org > > Signed-off-by: Suren Baghdasaryan > > Currently, the Rust build doesn't work throughout the entire series > since there are some commits where krealloc is missing before you > introduce the helper. If you introduce the helper first before > krealloc stops being an exported function, then the Rust build should > work throughout the entire series. (Having both the helper and the > exported function at the same time is not a problem.) Ack. I'll move it up in the series. > > With the patch reordered: > > Reviewed-by: Alice Ryhl Thanks Alice! > > Alice