Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp237834rdb; Thu, 22 Feb 2024 02:01:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXux11rRGLqYW6XQuYORNb0mdFy7AgVIgHWQqaAjbuNaKHNgF6n0uZjrqwnf8wcLFvcnHoKKsdxTj2biEJEgr74wDuuq033W4aLm/aw/Q== X-Google-Smtp-Source: AGHT+IF8JuPrFBJ+ZUTYwPCz5Zv4+N8PEvyz9kFCvSO4mfvx8GJZ773ip+h2CwbuVYYXC9jVal34 X-Received: by 2002:a17:902:d4cc:b0:1dc:1940:c661 with SMTP id o12-20020a170902d4cc00b001dc1940c661mr7781689plg.36.1708596098783; Thu, 22 Feb 2024 02:01:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708596098; cv=pass; d=google.com; s=arc-20160816; b=YlN3wxibuvis7dyP4o29gFJve0vp5YZwIH4x7QZMknW9CDvjKYx43Cxx74tVqDJkfH nreyXqbsk4dThVG8yfcKctlaugu4mKkEZP0RgpTCAyXXSbGSdZd2WL1Dv/evMZoHnwD1 TmfaTOVbjkx4zExQOWo6FzEJEOBpuCt34Qe84icwwxacAw+UhKYTaHXO7//jPRPePRHa AqCUqKQzRggJMXf78vom0P8u8E6CXhYOpLQoAmL2EkoGIapdazpnGzgkYh1+CXuOzKrj ZmLHnoYD1BMpMCu8elqEcDe519XhZijzZzZlL/UBXbmUMCAUIZ2AzEiNpRq9PEl6cgni VM2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=xY3a5A8TczyzS4EQy7YnxSv2e9KYZLcka7tIrv2ih1k=; fh=5kvBpXuvwoaew+k+blWBNFCkqYuaXD79JKfz64z6Wlc=; b=LICLr48ddbS0tZaOSD6KTdA6bIGDA6S68olaaZbqgUKbGmjF5zWVqPFozqeSx5+YOw /KSnj0Qt4Q18W3Yf3BcymJ7k6bTAHRj6aLh6Fxa8HqZaGLM8ce+yCP2UmNP9LFNaR6zu PTKtNT8VTw9tEB9iklO4Tm3Llbg6gJWXpAhtcNFHQD9ie8OUXinG/v+juRpx9pOArjm+ Rp+51pjtdtgAwan3ecoXCgKhNNJIm2wvJsvUolgcO4jZuUtM8cxl8t5YzKTVgKlG8JAR ZF49/reobG6Kg7GUYDviqixOmMBItMNkBf6Q4LTWadqiUrLinvpLfmbtYvKl/WdjlwbH TI2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=zlrfBg04; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-76280-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76280-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i16-20020a170902cf1000b001dc11e75111si5416469plg.285.2024.02.22.02.01.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 02:01:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76280-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=zlrfBg04; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-76280-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76280-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) 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 AA855283A40 for ; Thu, 22 Feb 2024 10:00:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEE1439FF5; Thu, 22 Feb 2024 10:00:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="zlrfBg04" Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) (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 B879838DF9 for ; Thu, 22 Feb 2024 10:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596014; cv=none; b=QgeVaqQ+gQaOhFqoC6/7xopZb+xkRow9sjiOZKNyTEfbWPQY2R/dbd6DdDPEfFFjD+e+JAQ8Sf60Mp2IfeBm8mQLLDyKdNNK/LUcDBKgIu3PuJ//EvQAfTxdceMJnTG8tUr3p9FvlVgRRweuH4fUYdTrJ0NMDbapTjbwbC6L8vc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708596014; c=relaxed/simple; bh=xY3a5A8TczyzS4EQy7YnxSv2e9KYZLcka7tIrv2ih1k=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VwuSxQMkGXYyi+tm7WxNKSQRsJHOC4JFN518JMD63zVzuetnFLdngkLz7/cf21iduOiWIXBNWJ42oR36c9JwNjmSmLWM8j8SZApDx/VYyLUv2VYx6rabLQ9RiH9BOsgxjt4+yfvTzG4QMebwwhZAiK/bDXgdHrwyVBU5Lba7Lk8= 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=zlrfBg04; arc=none smtp.client-ip=209.85.217.51 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-vs1-f51.google.com with SMTP id ada2fe7eead31-4706de5227aso713108137.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=1708596010; x=1709200810; 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=zlrfBg04Kyxp5cU/S+Rbn4i0cNrs6fdhkV+J1L6Ak7MObIRgzDD5LTI5LuNGF2wntu 8q4hCTwDAmLxRhzeMirRlwx0DKzhFbo9x/Y5uQw2oOyNgEAMRmCJphDpNHe9e6POG2Iv 1RTVfp7AB3h8VKhekGPVT75ZpLxsY4navma8mHg5u2kqQswLFgJ9zMltf/uQfkmsLNWq F77rBkVMysLYOEAhZGradAofoWCU5IAU/b5p0v8645xs7xwEWIJfzMg0rtXSIhSR4oGM lIE3lNUNHsiZs+VbLbs3KQXmutYvhf0mdMOIwE5L4OKmG86wC5usgZlhfU1kxRUtryLU Ok2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708596010; x=1709200810; 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=I8cRFbFJZDnuO+WXtDk41dVsxUz1zstEVgAybrE5xbSlaGUBOZ1UA3WRFOindQ5duz P+lin/BVrYQ1/wsMOpkAgcSigo5+1FNhnzxiroxnajvt7oLVb6ihlLbO5euFAdowwgVn fKgxYJFNT0OZD5kfw7m0f16yVPFoxVYs6kuWAx+NT3CeXma2ioLcaAHWKr2KarGKI7cO +zLJm1zNAW3/5rCTRRtCpotMATisQ3YGcPMdwfzSnt0j+6DA3HQYAlnzdxIs/g+qt/ym 1kIbhfw9ahwyR/Cbqltnj36Mke18TRxgvuquPwygFTpQKDag/VvpUEBTGSs1LiT/Zzxn Lahw== X-Forwarded-Encrypted: i=1; AJvYcCWbsMQZXl1zvLuI8Me4y/lMbqpKUeT6TvOlNBWliM7WO20PLDCjr+pCQXuR5XEWAP9R70T3PIuoAB8l7kVXr75/fiCLMpPZhcEjzuTy X-Gm-Message-State: AOJu0YygvjB/qW1ISXz8g1J8vLXFawffAowYdrfoFrimI8Waz2nyvNN4 qNOPYXXyE3MPP4VQ5pGyiWBVDcFDcemD8SFmOJImW4MgQx2rS6LjtKH1ZV+wGUxt066XA7N82m2 BOO9nDaamgaeVHwLnlzT8LN+KPSyxgV1BNDEB 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: 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: <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