From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) (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 B99A938FA0 for ; Thu, 22 Feb 2024 10:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596012; cv=none; b=f5K8JVWoZxaZYv12iOwDA0eBamo8QNsvpnwgUzUFEX/MsZ2wSbl2UFILxjH20eh+RSgBEKt63ztzdjZd3OOupN3mV0VYpmVelwHlcM8ZURU5KZcndWJOKg7tSLmXlx6jdI3KS0lMI96z8kMxlmbArbOdEonRFMAIePEeOBp9hDs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596012; c=relaxed/simple; bh=xY3a5A8TczyzS4EQy7YnxSv2e9KYZLcka7tIrv2ih1k=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bEKXNSlcIGPyDQZ1i5p0/+qkRPPJqG/0thC7FJbvMYJMsSTJrYbTSUp70MYncKfzF25NNbH556pozimgbgrH1E4XW7CEKQnbc0DVtp1nbAZ882iXbDcgTpeac4RqP0DzdkD+bkFC1Gfqo258IXKyOU7pQoa9R5/ypz2l2SdZrnE= 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=Fl7s6ciS; arc=none smtp.client-ip=209.85.217.50 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Fl7s6ciS" Received: by mail-vs1-f50.google.com with SMTP id ada2fe7eead31-4706de5227aso713107137.3 for ; Thu, 22 Feb 2024 02:00:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708596009; x=1709200809; 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=xY3a5A8TczyzS4EQy7YnxSv2e9KYZLcka7tIrv2ih1k=; b=Fl7s6ciS+4en1deeuOU1AB9WFgIiGeW1f4XEAekJTZ75iq/9K0zrmPX8NhW9X9AUuT rIQ1bhTNP1/ArqGkQo6HiNaG0lvbiRuCiwjxV8zRR931e/kxKipH+1tXcxSwhCciQD9F swg16CJUpxbze9NfoejW0g7KuioJZM3daXgKi0E2vxseSMc6+r2+y6uYd8LipL/9aPf2 yuz7aJTTtJDtHnmyioZxhaQphffvs3V0hrDSGHVrhPHJRUziBd/e2Rkt1xZwqbP9HYzY u1ipZpJD+g7DjFIyZZEWx98Hu+sWJfypdUg9c0mxSGGmqpL7L2EcLXkzklunvFDnY198 jCXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708596009; x=1709200809; 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=xY3a5A8TczyzS4EQy7YnxSv2e9KYZLcka7tIrv2ih1k=; b=OOd6HydXP3xG25Z/PQEenIHdrgBo5r+Zpy8NJoOkgvoPhdKd4dAL2fb4kY02Nn6bID wcOJK8gBQ0OUIovGnPO+98UKyL5wisvShoMIolGMmyccqE53ypXak09kHuVlcnOTeO5s Ls08DESaKUvkzUKFjT4vTVzL2Wji+/AbrosrG6UsfVzYUWT048fTBH3WfkkMrJeRSnwJ aP6YonvDCKvOwlPKfuhHZ705IhtM36vig9Kb+5BQ0r2qGdJ1icKx+egYHIZr3nShKLPe xtnu5E8J9xJqw2lDHwtm6lGco3lGVa8VhMtjYIMu/RxgTKONPkxjG96180kbO7JGPDuL HUVg== X-Forwarded-Encrypted: i=1; AJvYcCVjOrGdfQTTEfma4bX7SkyfL0nYXiisg9WCuV//BZLoCuqt0m9S6aU6/ygWPrUg7vR8UMMs2PfEi9Nx8RyF8LIQcSPPlsjuFbDyS7kpxaU= X-Gm-Message-State: AOJu0YxQlToyF1SUyqshX0PjtnpTGr/2WJtlmzdvWS7c4OeargyOM+YW g+ijHHZRhyUcQmiq1bzZ+OmrqrKQfN8jqCPl0PNE4XC2dqniI1i1UA/vIG4NcSWK15AUBz5Xvw8 iFjM1OqQT4NUQkn8MRtAdo/XEPaebLZEVecVn X-Google-Smtp-Source: AGHT+IHtNH9SG5kviHG0Zp4ObgcElY0QaPwq/WKIrJZZn0CRZo740etRowxrv/bo9NQSJHSXY5Ib9q+PDO3ajLn3tTQ= X-Received: by 2002:a05:6102:1626:b0:470:4a6e:4a4e with SMTP id cu38-20020a056102162600b004704a6e4a4emr14352031vsb.29.1708596009136; Thu, 22 Feb 2024 02:00:09 -0800 (PST) Precedence: bulk X-Mailing-List: rust-for-linux@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: <20240221194052.927623-25-surenb@google.com> From: Alice Ryhl Date: Thu, 22 Feb 2024 10:59:57 +0100 Message-ID: Subject: Re: [PATCH v4 24/36] rust: Add a rust helper for krealloc() To: Suren Baghdasaryan 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 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.) With the patch reordered: Reviewed-by: Alice Ryhl Alice