From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) (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 65DF514CAA9 for ; Fri, 23 Feb 2024 22:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708726680; cv=none; b=XF5dVb7ew/bmsPV4fmP+dtAnEe/Vsw5KYt5mFvm3KS72J9ZDDfpCKcjnRhU9Jy9bkpsGpNz4GKsUa3gS/j+THAciOrCuAkWLI6FThbq380Bv1rplzwpTq3ySt/ffaiixVjj3k7t4Liae659kiyNAPIy5mk/8egrfpqovv1i1yzA= 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.219.176 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="VdEii+wV" Received: by mail-yb1-f176.google.com with SMTP id 3f1490d57ef6-dc745927098so1271953276.3 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=QxlhMFceAnrzoWyuT/UP2JVlEGuIEdx8VCt8zgWtC4dlqFxeQLP99t5xL2cbAk1kKG sZadc+7q7o4vBTw+FXh5O8zLD4Rh9Vc3rEPlzqPaY1lknoZTfgtZT5WvqS1vqtmiNbPv f7eb28A8jBCmbYNF3zNVtUhHwpiWde7HLccTkEDGmWm1IsxcaEOeSExixIAZsGwYU0OP ZFE0Ox5IFU8Y6hPemIlNFDsTUqHEw3RQ57Q5ctQt2BDcmJ+6a11v/gHvt/iEwSHLtSUD DOAt3F5u8IJjmP1fLvrJDNYfG3mNK1wZY6t9f0a16tfZ2vhupp01gjfFfF2zHXyKSCF0 QT+w== X-Forwarded-Encrypted: i=1; AJvYcCXQfZ0P9ZmIrAog5RAeFeN7T+L/L4K3smcma4UMAmVW6CQZqsmvPWMG8ynG/N5a7tekQzLTRDQuKxMf+M+CPUePTdoOEQaLSrl87Ko9Yrk= X-Gm-Message-State: AOJu0YyXzPENm77ZQQUBNK3pEktcSfpGEiT9TzwN/RB6fmYAY1h0ns0R qObhwUaal8/vFfnO4pQ2FTi6Z5f35x2ORFAd3UucCivQOBu7OX+erWP5ml21lAWgq9X/iObg6jR 8FgsLKMyWNGLH4YDcH5TRpUEWbf15w2gvz/Np X-Google-Smtp-Source: AGHT+IFvVslf3S11aDqNfvq204R/MIDJZtFxjw2mS4TXD0XUNA43SeY457VF5UW1NHR7Lcxr2CpVLic3B31+1rRIW2U= 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: 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: 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