Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp409553rdh; Thu, 26 Oct 2023 05:51:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE67COfeTllh+w54C7bsCIemEWI0/BmWImlC8Fj76FRFqgfl2xJcGAzsPgZpe8FD45MYdpE X-Received: by 2002:a25:ab63:0:b0:d9a:f948:aae1 with SMTP id u90-20020a25ab63000000b00d9af948aae1mr18129728ybi.29.1698324684126; Thu, 26 Oct 2023 05:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698324684; cv=none; d=google.com; s=arc-20160816; b=XoSXnj+4+XNWk44Lhkic+JfPopixf57gPBFOL3e/Q+Iu6VQfIB3OLXeCdPE5pC0LjK cBmrO8I0c/e4n9OgG9QDFgFe3HDcRTUr3KPf4+x4CpUR0oVRs3xQ65TU/aCUryY1KCOo VjcgSYlGNU32gz/qqqTsdScD1cU8lEV4yZpbEivyN4e8mR+UpWxOIERpR/IfZWsUVkum DBNP3LrsHUB1j2gr9986iZ40lfS4KhquNnTgYKEcFYTlbdntMiv/oZ0r7IugsgvrXnR4 f5ptw1GEDMNZvABCdyw/XhbVnMTM5P1HzanFF4CK+bkmmpuNcYOOWr5Jgk+HMyOxJUg0 njAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=+dW03GHWYPLZLaKTxAjZPxWe4sfH+uCdwkxvOYuNrWc=; fh=HxDYHQdzuTIqOsbkTuRCNuKL/7WkOyvNe0ylCag85Vo=; b=OvoYzdMs3RO6pjBAYIlDKYS6qEgcVz4bmMEUDwRy3Br6VeCRGoh5rgXXU9bvetHtMb QLeY1jfQ+pTgSYIeia+hRcIkz9In0krJDrLHkPGC6QhMMRO2x4EWwfMTDqcKnPVjpjyQ 48k/6kcZMOO6eHNbctNAHddujliiTgrpXSKbOf+GRGpTj+gCYUNQZAL8QlyQWqNeqba9 AlXFVW3mmfTQwQv2VBmc2EQDDfYxzhIwtg9V9LXyzplLW6+NbYfwrMEWQBZM9LirzJg0 Mz0rDtFJ5na4ql6RApISKdoPTY4TFM7xHio/TjXyk5ef3SupJmn6epB/9gmpMcz6la74 ppEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id c20-20020a25c014000000b00d7b93e588desi13047536ybf.503.2023.10.26.05.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 05:51:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 556B68087251; Thu, 26 Oct 2023 05:51:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345000AbjJZMtS (ORCPT + 99 others); Thu, 26 Oct 2023 08:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344972AbjJZMtE (ORCPT ); Thu, 26 Oct 2023 08:49:04 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EC26210A for ; Thu, 26 Oct 2023 05:48:12 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBF58C433C8; Thu, 26 Oct 2023 12:48:08 +0000 (UTC) Date: Thu, 26 Oct 2023 08:48:07 -0400 From: Steven Rostedt To: Sergey Senozhatsky Cc: Thomas Gleixner , Peter Zijlstra , Ankur Arora , Linus Torvalds , linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, Joel Fernandes , Youssef Esmat , Vineeth Pillai , Suleiman Souhlal Subject: Re: [PATCH v2 7/9] sched: define TIF_ALLOW_RESCHED Message-ID: <20231026084807.3d50aee9@gandalf.local.home> In-Reply-To: <20231026075016.GC15694@google.com> References: <87edj64rj1.fsf@oracle.com> <87zg1u1h5t.fsf@oracle.com> <20230911150410.GC9098@noisy.programming.kicks-ass.net> <87h6o01w1a.fsf@oracle.com> <20230912082606.GB35261@noisy.programming.kicks-ass.net> <87cyyfxd4k.ffs@tglx> <20231024103426.4074d319@gandalf.local.home> <20231026075016.GC15694@google.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 26 Oct 2023 05:51:00 -0700 (PDT) On Thu, 26 Oct 2023 16:50:16 +0900 Sergey Senozhatsky wrote: > > The goal is to prevent a thread / vCPU being preempted while holding a lock > > or resource that other threads / vCPUs will want. That is, prevent > > contention, as that's usually the biggest issue with performance in user > > space and VMs. > > I think some time ago we tried to check guest's preempt count on each vm-exit > and we'd vm-enter if guest exited from a critical section (those that bump > preempt count) so that it can hopefully finish whatever is was going to > do and vmexit again. We didn't look into covering guest's RCU read-side > critical sections. > > Can you educate me, is your PoC significantly different from guest preempt > count check? No, it's probably very similar. Just the mechanism to allow it to run longer may be different. -- Steve