From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 871A8C83F11 for ; Sat, 26 Aug 2023 17:30:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CF33D8E0002; Sat, 26 Aug 2023 13:30:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CA2D98D0001; Sat, 26 Aug 2023 13:30:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B6AE18E0002; Sat, 26 Aug 2023 13:30:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A31BE8D0001 for ; Sat, 26 Aug 2023 13:30:03 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 6D98580328 for ; Sat, 26 Aug 2023 17:30:03 +0000 (UTC) X-FDA: 81166943886.16.EA93C9B Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf12.hostedemail.com (Postfix) with ESMTP id A561340010 for ; Sat, 26 Aug 2023 17:30:01 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=QYaopLax; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf12.hostedemail.com: domain of skinsburskii@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=skinsburskii@linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693071001; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zGdXA48vU4Dp2XLIM3yz7KXzGZNyViHy9hqv/k9oBqk=; b=G7zClheQ/P7wkqr1smPXX7KKjZ32oiXOheC1v/+tZWnsCz5KKmLt+PZQvFkfythZM2GKg1 whAs8qU72nP1t6kMPURjTRr14xRSUNuOcA6KhEHdarQxwG8jabb0q1WOQiFn0ih76LS24u 2EntpU7q0FJooZ8q3rKNLyAYhm9PI0w= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=QYaopLax; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf12.hostedemail.com: domain of skinsburskii@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=skinsburskii@linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693071001; a=rsa-sha256; cv=none; b=GBqaSGpAnGoYvrbW8+mHqSRwbri0MvfBqP0LCeAMeMaTOz3PDJSHQJur+JVrxZg0TI8LfN RzLYfAdz5Fl+uPsReJwEY0vVX5edVWgcGktJNfnF+SOFCpwYXIvwM3R2JM7roeXF0aHxUS f6z25u0GnnzG2plSgDdsUt4ushr/xCc= Received: from skinsburskii. (c-67-170-100-148.hsd1.wa.comcast.net [67.170.100.148]) by linux.microsoft.com (Postfix) with ESMTPSA id 21D9D2127D30; Sat, 26 Aug 2023 10:30:00 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 21D9D2127D30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1693071000; bh=zGdXA48vU4Dp2XLIM3yz7KXzGZNyViHy9hqv/k9oBqk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QYaopLaxlsIUYfkyrQeX3Mg6kCMCcex7yGgoo17hRS910RQ0jBkVAlpLHRdEcQ+Qp Ocf6OYPlDvyZ5JFeY5bgdTqlQmGxgVpEZf0uEcXI/x6VghtVQMiY8258CD76DrbcNL 39DOYkCKD4cwXfXvuE6ZH8VQQHC/773sPJQGnZNs= Date: Tue, 22 Aug 2023 23:21:59 -0700 From: Stanislav Kinsburskii To: Greg Kroah-Hartman Cc: Stanislav Kinsburskii , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Wei Liu , "K. Y. Srinivasan" , Madhavan Venkataraman , Anthony Yznaga , "Mike Rapoport (IBM)" , James Gowans , Anirudh Rayabharam , Jinank Jain , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] Introduce persistent memory pool Message-ID: <20230823062159.GA25731@skinsburskii.> References: <64e7cbf7.050a0220.114c7.b70dSMTPIN_ADDED_BROKEN@mx.google.com> <2023082506-enchanted-tripping-d1d5@gregkh> <64e8f6dd.050a0220.edb3c.c045SMTPIN_ADDED_BROKEN@mx.google.com> <2023082633-magnetize-cupcake-accc@gregkh> <64ea25cd.650a0220.642cc.50e6SMTPIN_ADDED_BROKEN@mx.google.com> <2023082620-saint-petition-bb89@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023082620-saint-petition-bb89@gregkh> X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: A561340010 X-Stat-Signature: c55ncpkdfhb3r6iyz6n1ihhqz3mgz9a9 X-HE-Tag: 1693071001-736978 X-HE-Meta: U2FsdGVkX192GMuMPxMyF1YkT6bt9jXKXSREfZ2AxHmBb05Lc/9bCksL3j/geVqwaA8Ar+S8C2evQslAVnSP3T57K31wlEiRsS5jAJwA4bGqQo910uPHP3Bn4x+w6tbP14QYzoTuiZz5F4KTejOZ7yQ1s2BoUOLy1Jvug1krJ3117D2ybKDAKTWxcM0VT6JNYovu79locD1WlHPnEzKaeLfjYFMlqVrgp8K2WoJDc1yVDUTv+kP3Y1us7KHyBxSIimRM46ZX+fiasNVRtDKc2OZinLwK0S5rHLXnrzRYlyxYdn3/aDAHB7lr9kmUQWxpi6CQFNzjuAgq1MPf4FO0xb2pC+yHBRHwj1ygLlg9gVOefrlnLk5JxSoghPUI2CvwkMqJ97p1Si7xCqfZvTUlEJ2hv8FOGPMWzOZliDc1mPE/a9hF0vD6g+n9jgY5b+FavpD3ug4zK9vu02cA72XmXWBHY/dff1DIC8Nnv42daEk88pZYiuqRKRfTGWKH2S8BELs0YymBTTk12IC4sCZYiyE/Uey/9WieIUCJdVo7GYMaLfArNM7RBbqJt5MEYCm1mL2tXz6SEQ6/xbUUj3X1AmUjCwzeJLtS+aNEQcGZBcN9dymtovdMdmvUbAf4+I9dkJuz5aM7z7Fs/BfwE5G2qLj6viuFyGalPiGxEDn3NTDiTylNbnyh9BGgoxx21tG7VA9Rfw4NJGy3SP8RH4CT3SGKmPMhjQ2pgL77LpnjSeki+eqmXutXlqjbLB6Bg0ZBZ3hYFvCca3Ht8tFQ5lWsrqv2rXj5tSxrHQ6ePTRk8dlWh0ED89YJIBAE/A1fuwh7nNQSkEpbvMDvAmtMalw9FTqTUUD0MD/NtWQ1PrsXIqM32cOh5oQohStR+gKqLVvxH51S65Sd1QviJvZ2OBBKqWrqKFbE+aIh9yvw3dVRh8r6AR9oRHPFZPpuz4gAwWMhhCAuHBCtjKi0maal8Tt bsHNROZC NNwUDnYipOUxYKyyV0Kf1r1wa34puN1Vouz+dryyVTtCxyAuRx3pjO0nriSSPFIeUaFx5qP0Qyl+9uCig+sk5c++62kipA0LN7zg9Pja8U0B4a5VKvzFTe89TF1GlRmTpp4TIck05l07+5RmHqkYr9eMnTlbVhRjVd147/q1+9ojHkNCkLsg4fiedjwY+2kBKVyMfNZE/ZqrC4wgjUzUH/NQssye+aAppv0ryFlxXwCHEs+5M+woWFFTA2QrmzyxcaWh+8uL+dSpxm0yNvdu8PfC16rAb+D9E2RO4 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Aug 26, 2023 at 07:02:12PM +0200, Greg Kroah-Hartman wrote: > On Tue, Aug 22, 2023 at 11:15:08PM -0700, Stanislav Kinsburskii wrote: > > On Sat, Aug 26, 2023 at 09:45:39AM +0200, Greg Kroah-Hartman wrote: > > > On Tue, Aug 22, 2023 at 06:36:10PM -0700, Stanislav Kinsburskii wrote: > > > > > > +#include > > > > > > +#include > > > > > > +#include > > > > > > +#include > > > > > > + > > > > > > +#include > > > > > > + > > > > > > +#define VERSION 1 > > > > > > > > > > In kernel code does not need versions. > > > > > > > > > > > > > Could you elaborate on this? Should kernel version be used as a backward > > > > compatitbility marker instead? > > > > > > kernel versions should never be checked for in-kernel code, so I really > > > don't understand the question here sorry. > > > > > > For code that is in the kernel tree, having "versions" on them (as many > > > drivers used to, and now only a few do), makes no sense, especially with > > > the stable/lts trees getting fixes for them over time as well. > > > > > > > This version is rather an ABI version. The idea is to make sure, that > > any future ABI change is explicit and reflected in the version, so it > > can be easily noticed in case of kexec to a kernel with an older > > version. > > But I guess there are other ways to make sure, that the ABI contract is > > the preserved. > > Which ABI are you referring to here. The user/kernel one? Or the > kernel/hypervisor one? Or something else? > Yeah, I guess the "ABI" word in misleading here, especially the first letter. I mean something else: the old kernel/new kernel. This persistent memory pool (its metadata) is supposed to be passed across kexec with the data. That is probably the main difference in comparison to pmem or cma. Since the header can change its format between kernels, there should be a way to identify it. > There is no "numbering" of user/kernel apis, sorry. APIs just don't > need that, you can handle things properly automatically without version > numbers (as again, that just does not work.) > This is fair. Version looked like the cheapest way to implement the compatibility, but there are other ways, which I'll explore as you suggested. Thank you, Stanislav > thanks, > > greg k-h