Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5609085rwi; Tue, 18 Oct 2022 01:17:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM43i+dVoGlSBkYPF+RmJSWZlFsMsXCQmK4y9SiEr9Q9wr3uXHud8vtPr3rQs4hyFA+H7Uv6 X-Received: by 2002:a17:906:8446:b0:78d:9f1a:9afc with SMTP id e6-20020a170906844600b0078d9f1a9afcmr1393744ejy.637.1666081078790; Tue, 18 Oct 2022 01:17:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666081078; cv=none; d=google.com; s=arc-20160816; b=zyPldlrXEDclgruvrAEF/TrYFrQY1Pevia8M3z5anxjgfv8tP0Ct2R3J741S684ogJ AFBgAWR6zcYalGtwob5eR74J4AJv9Hf46DhI5adfgGgK+eF6NJT4QBhCKoztGIGOeR1A iSnH9Ts00btFjGm+j4DWtmlMBNdhBk1U+NaEXmkuS2i16jE4Dfo2/zMg7Iw9bEnOC1nb 2+mgf8CLbiCEK/tzmyqZO6KhgJy6QGdSRjGy1PGxQrzqmBLle0meMy+0Hv+TFLsVVuOH yMjc9WLIHRuu7MhgS59VgADPYKZz2dGj15mjvP+zkYPYoIYVWRdBiae8sLPwzJHVfxvG Tmbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=Ke4w2J4dPe970jTSZLZN8cLPPnUzQU8Z6qS3Lkrav70=; b=v8/QeoREduZgwl1N7kNDpLpxH0+1GKFJPcDjax0OGUCVyrMTVfOy4iz1p+p8cScI1e EtB99WCUP7AjRtGA6tTKHIjaHWNGxiYpT8JBJnv8pE1iB2kUCZRtXo6/ExQaubJ9kYIt 3p70TpdELnu8QA9Q6yY6heTa3G3ONz4X8YiPCcLFmNEyO5jFXdT9JzfbYU1BZ5GQvLoU vy/BusZ/NpQ6PsqbCqPoprnURFhjrQtk+A/ekptlD+ZgHDDBrmr/CRAVkBl2z6Gc4me8 5kd0o/IcqsqD+KvuH/WJ8HEjXbPYzcEmig0/igXj65FOM7L7F2x7L07BNX9XDNUHqoIb A06g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=YC9fUGhU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o14-20020a170906974e00b007919388d2c6si1869051ejy.357.2022.10.18.01.17.33; Tue, 18 Oct 2022 01:17:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=YC9fUGhU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229456AbiJRHr2 (ORCPT + 99 others); Tue, 18 Oct 2022 03:47:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230140AbiJRHr0 (ORCPT ); Tue, 18 Oct 2022 03:47:26 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B12164448F; Tue, 18 Oct 2022 00:47:24 -0700 (PDT) Date: Tue, 18 Oct 2022 10:47:20 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1666079243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ke4w2J4dPe970jTSZLZN8cLPPnUzQU8Z6qS3Lkrav70=; b=YC9fUGhUeXTcSyZMEAKTWIKcDRzJRHKx0IbN3ZVNp6BBHCW9o42o8LmMKrxFhifBU/tX+A LHyq2wm8Bl0pyy58F85pv55QeARQ4XT5/pVoqW6cV3b0CHQcrLC9fk/2N7s1XQTqvpl9qt PkJdPcfa5W5Tna4u9YTlYPakG77WE8s= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sean Christopherson Cc: "Maciej S. Szmigiero" , Gavin Shan , kvmarm@lists.cs.columbia.edu, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, ajones@ventanamicro.com, pbonzini@redhat.com, maz@kernel.org, shuah@kernel.org, peterx@redhat.com, ricarkol@google.com, zhenyzha@redhat.com, shan.gavin@gmail.com Subject: Re: [PATCH 5/6] KVM: selftests: memslot_perf_test: Consolidate memory sizes Message-ID: References: <20221014071914.227134-1-gshan@redhat.com> <20221014071914.227134-6-gshan@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 17, 2022 at 10:08:48PM +0000, Sean Christopherson wrote: > On Mon, Oct 17, 2022, Maciej S. Szmigiero wrote: > > > +#define MEM_EXTRA_SIZE 0x10000 > > > > Also, an expression like "(64 << 10)" is more readable than a "1" > > with a tail of zeroes (it's easy to add one zero too many or be one > > zero short). > > +1 to not open coding raw numbers. > > I think it's high time KVM selftests add #defines for the common sizes, e.g. SIZE_4KB, > 16KB, 64K, 2MB, 1GB, etc... > > Alternatively (or in addition), just #define 1KB, 1MB, 1GB, and 1TB, and then do > math off of those. I mean I love boilerplate as much as the next guy, but we can just use tools/include/linux/sizes.h -- Thanks, Oliver