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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF9D0C77B7C for ; Mon, 29 May 2023 03:21:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229853AbjE2DVl (ORCPT ); Sun, 28 May 2023 23:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjE2DVj (ORCPT ); Sun, 28 May 2023 23:21:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0498BB for ; Sun, 28 May 2023 20:21:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 62BEA61524 for ; Mon, 29 May 2023 03:21:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25E57C433EF; Mon, 29 May 2023 03:21:36 +0000 (UTC) Date: Sun, 28 May 2023 23:21:32 -0400 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: LKML , x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra Subject: Re: [PATCH] x86/alternatives: Add cond_resched() to text_poke_bp_batch() Message-ID: <20230528232132.14ab3201@rorschach.local.home> In-Reply-To: <20230529115246.a61734ce4e6d7644e2faec72@kernel.org> References: <20230528084652.5f3b48f0@rorschach.local.home> <20230529115246.a61734ce4e6d7644e2faec72@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 May 2023 11:52:46 +0900 Masami Hiramatsu (Google) wrote: > > + /* > > + * Function tracing can enable thousands of places that need to be > > + * updated. This can take quite some time, and with full kernel debugging > > + * enabled, this could cause the softlockup watchdog to trigger. > > + * Add cond_resched() calls to each phase. > > + */ > > + cond_resched(); > > Hmm, why don't you put this between the first step (put int3) and the > second step (put other bytes)? I guess those would takes more time. Ah you're right. I still want this here to clear the 'need resched' flag before we start the process, but I did miss one after the first loop. Thanks for the review! -- Steve