Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oDrBf-0005eS-JN for mharc-grub-devel@gnu.org; Tue, 19 Jul 2022 13:39:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDrBY-0005b1-RN for grub-devel@gnu.org; Tue, 19 Jul 2022 13:39:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52136) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDrBU-0008O6-SW for grub-devel@gnu.org; Tue, 19 Jul 2022 13:39:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658252338; 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=hzH2Bibl2ggA5dAP3WC/+BMM6nHFaE0L/uYVBo35KGU=; b=Nbsii4EmKEe1veRGoBcLpYYoB5bvJYTmsoRaLvf1V1MteiqUgje3oMVTDuQRGaZ+RKsqZ4 QJZrF+oK5sLPixgJQGesItyhNsNad2PkhVp3B6QliH0Z6grKzL4X3ckj9d9DiNU32a6B+V 0cYFhrRwlKngqFG+Z5+sHNn0txtAAZE= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-572-AFO5jI4MPI2DLogwejnqIQ-1; Tue, 19 Jul 2022 13:38:57 -0400 X-MC-Unique: AFO5jI4MPI2DLogwejnqIQ-1 Received: by mail-qv1-f71.google.com with SMTP id e1-20020ad44181000000b00472f8ad6e71so7881147qvp.20 for ; Tue, 19 Jul 2022 10:38:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=hzH2Bibl2ggA5dAP3WC/+BMM6nHFaE0L/uYVBo35KGU=; b=gJaaGDhj2bajPTLdr/Z9qawD3K8oMPg53oSJzvCykWxDPmS+fd6UD+jCisaD0Y5OOZ yYd3JA9jdDrCe+iZRuzyXqBX5MRMkf9+hQZ+xHNrYI9vTIzyWeqWI3bD9AVYh0kkCIJe A3uhFr9mLH1ccZXppGwceFHhrjWkKDAD1Hl3A3LfybP5+UbF5uw9RE8NdGiTVaUqtPD6 0MTkH5HsKPFxi8yiG1/8NM+F8AiQtToj1+Zu09gLXDQQxrSsNuRsd8/Y/r7/4NovoZrU dI8FN4tfbqydkglNR/IEh86HC8WyzlgoqkCtMSabCdSsMFxx4Q+C9zjztF9HO53lRf6l HUIQ== X-Gm-Message-State: AJIora/beKv2qChaG+ul6NlTMHT7RE1YS73qzck9bpplrU1dTMpSh+vR FZZr1xnCrDM1edgsfsMCGXISL/ydzlf40mX5C2znlV6cOdd9nXdTDG2uwGCIE35K83gZJ0yFKQU GiXtT7Lh0Z5s= X-Received: by 2002:a05:622a:18e:b0:31e:efed:f449 with SMTP id s14-20020a05622a018e00b0031eefedf449mr8495760qtw.465.1658252335605; Tue, 19 Jul 2022 10:38:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u2Y7C0fLin2NkHOmZLZ8ZnZ6AZfhx7oBq48Mj68A3LSk43BvMFQe3uTiI/kuJsShkX9wKX7g== X-Received: by 2002:a05:622a:18e:b0:31e:efed:f449 with SMTP id s14-20020a05622a018e00b0031eefedf449mr8495737qtw.465.1658252335089; Tue, 19 Jul 2022 10:38:55 -0700 (PDT) Received: from localhost (c-73-227-130-153.hsd1.ma.comcast.net. [73.227.130.153]) by smtp.gmail.com with ESMTPSA id d3-20020ac851c3000000b0031ecb90454fsm10892218qtn.70.2022.07.19.10.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 10:38:54 -0700 (PDT) From: Robbie Harwood To: Daniel Kiper Cc: grub-devel@gnu.org, Peter Jones , Javier Martinez Canillas Subject: Re: [PATCH v3 1/1] i386: Make pmtimer tsc calibration not take 51 seconds to fail In-Reply-To: <20220719132835.spiakygethu7l7z6@tomti.i.net-space.pl> References: <20220714214251.20375-1-rharwood@redhat.com> <20220714214251.20375-2-rharwood@redhat.com> <20220719132835.spiakygethu7l7z6@tomti.i.net-space.pl> Date: Tue, 19 Jul 2022 13:38:51 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=170.10.133.124; envelope-from=rharwood@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2022 17:39:05 -0000 --=-=-= Content-Type: text/plain Daniel Kiper writes: > On Thu, Jul 14, 2022 at 05:42:51PM -0400, Robbie Harwood wrote: > >> This outcome was tested using grub compiled with >> GRUB_PMTIMER_IGNORE_BAD_READS defined (so as not to trip the bad read >> test) using qemu+kvm with UEFI (OVMF) firmware, and these options: >> -machine pc-q35-2.10 -cpu Broadwell-noTSX >> +/* >> + * Define GRUB_PMTIMER_IGNORE_BAD_READS if you're trying to test a timer that's >> + * present but doesn't keep time well. >> + */ >> +// #define GRUB_PMTIMER_IGNORE_BAD_READS >> +#ifndef GRUB_PMTIMER_IGNORE_BAD_READS > > I still do not understand why we need compile this code conditionally. > Why cannot we build it always and enable only when debug is set to > pmtimer/all? Or use another variable to enable this test? It's mentioned in the commit message and the comment I've quoted above that this is for testing - there isn't a use case for defining it otherwise. (I also touched on this some in reply to Paul Menzel.) As it changes more behavior than just debug prints, it doesn't make sense to me to tie it to debug. More generally, I'd rather remove it than making the behavior runtime-configurable. Would you prefer removing the #define entirely to the patch as written now? (Rest of comments make sense to me and I'll cut a v4 once we resolve this.) Be well, --Robbie --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEA5qc6hnelQjDaHWqJTL5F2qVpEIFAmLW7CsUHHJoYXJ3b29k QHJlZGhhdC5jb20ACgkQJTL5F2qVpEJYUxAAolAdGDWd7hqmqJm4cKstpcFZNepW Bw9O2ZO7CEucGCccG+QWRSO9aken+Lh5cX7Ls6iI41URIkj8f+98JbERT9rdZxwk Y0eOBDJQBuz2m9lCfshI79G1Hnc3Z8qaaFZWSI98+cq7JAFCmXqpQM5Hw5NnhDZK 6oo9b3fOq2d+/0aGadxxG9HW2lQ9JvHEWWsiTla09bzMnBVacgMzOwHUI/pGw/bO 2sQzci0RmV6kn0Nf+4z4VBz66awRMyqVhRJjBEEtzve3Uh/OtKl3EywyFGqAnxSo z3IK+3v4rrOn+zL+nYtBPtzwl4MZ/GWTvtvCFZbTs1uyif7GQwc/yH0Z9kp3WVzj 5WIJsnmg6LJH0ztSeSua6xRts+CwVGXljl6pagNhZzh3B+v6UpcYvUv6NMmuplnt T5r1yWSRIUG+kGEmXXHnBu2Tzl3GpBMf/UmfMRB5tZ0vvthYswPXbpCTWI0KV9oF BHpr4IflooKyHkoDXxwEwloP2fYmIjVLRTgr3a6Bz/4GJsWNGJ9KqwnZar8wNz9d qqITGFTQ8MAgsCujt2WBdel1oJx4JuJ2n22MJP/dG99jXUzfP7FB6cFn17kSL2Gb h9Nb3FI/65AVbEcOCfl1eBl00imn9gdsAklPRBixrRxdw6uxVqHTx2acEuf9iu81 PmjugTzfH5fOTwY= =Lnfi -----END PGP SIGNATURE----- --=-=-=--