Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6893659rwb; Mon, 5 Dec 2022 20:34:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf6B79ZhPPiUUAqm6GVNNyHZK0guV7yIu7rAD4dKZNF68H++UuCDRkzndtxj5YPyP/WDAT0u X-Received: by 2002:a63:1015:0:b0:470:5f22:1496 with SMTP id f21-20020a631015000000b004705f221496mr57653176pgl.585.1670301248017; Mon, 05 Dec 2022 20:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670301248; cv=none; d=google.com; s=arc-20160816; b=vgnTii/sb4niaUQzU2o3ILhDwruHjf4jUPlvaT9nrPoxkBl5v2IPeaDUasEOtml/XI uSZCRFre5jNI14z4SH5tNgoshRWSKrHKNLhA1/MQslsV1bcZHkX1epkeCEcJ/udoB2Zq dzLMT/pKTwJYYKbZBbm/cbnSPIw3/+EhhDEMNJPIrRq+IcTabVCiuwOeWG3EOqQ8lw3/ FAgwab5wrg5wo9Ycp47AFqMiFsWsFq6bBaGVZS4/exCl5D9XK5IvWdq64eHIsXijsa8e xjqXDtNxcZe2CJOvsFx4lL5kzZBQyQfaDCg2dJm2zJGwoxMG7OUwHSEF7LK/gNjPXNAy YZvA== 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:date; bh=dFPwD3lKiPRSOtKQOtxIFLVTuq0xD5zYuSFDzXljNjU=; b=mWzGady9uWjF3YROEo4WjmIkyVm+T8sTUW7Z2Y+BJvovv/qWN8qqtw2ZKvW0tYaJOM 4qOFNRoH90ejW295OLSK9K8f5/HvLHxPM209natA9syZy9KzZAgnTgzrxSXcYAj4ckxH L1OaWNz80BFuLrTTev5A4ts0zN+3J68i7g9+CHykXJXaIuvuv036SmMZ7/vcCDWFpfge 3EteISDMJBSCuRuw+WEJ5bmCQXi/OAUI8g/+ZW8NyYSWcpX9suWEgnRg/0QK+zhgutRP 6DNXznxk9bOJEoOKpGR/9tcNPn871ROr8kwkN0x/juGZ4TkP3itb9CXNmWO+/FqTnhYl qbAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h4-20020a170902748400b00186c3727109si4318682pll.41.2022.12.05.20.33.54; Mon, 05 Dec 2022 20:34:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbiLFE1W (ORCPT + 99 others); Mon, 5 Dec 2022 23:27:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229982AbiLFE1W (ORCPT ); Mon, 5 Dec 2022 23:27:22 -0500 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 897421A3B5; Mon, 5 Dec 2022 20:27:19 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1p2PXr-004LJG-Ep; Tue, 06 Dec 2022 12:27:04 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Tue, 06 Dec 2022 12:27:03 +0800 Date: Tue, 6 Dec 2022 12:27:03 +0800 From: Herbert Xu To: "Elliott, Robert (Servers)" Cc: "Jason A. Donenfeld" , "davem@davemloft.net" , "tim.c.chen@linux.intel.com" , "ap420073@gmail.com" , "ardb@kernel.org" , "David.Laight@aculab.com" , "ebiggers@kernel.org" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4 10/24] crypto: x86/poly - limit FPU preemption Message-ID: References: <20221103042740.6556-1-elliott@hpe.com> <20221116041342.3841-1-elliott@hpe.com> <20221116041342.3841-11-elliott@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, 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-crypto@vger.kernel.org On Fri, Dec 02, 2022 at 04:15:23PM +0000, Elliott, Robert (Servers) wrote: > > > > -----Original Message----- > > From: Herbert Xu > > Sent: Friday, December 2, 2022 3:25 AM > > To: Elliott, Robert (Servers) > > Subject: Re: [PATCH v4 10/24] crypto: x86/poly - limit FPU preemption > > > > On Fri, Dec 02, 2022 at 06:21:02AM +0000, Elliott, Robert (Servers) wrote: > ... > > BTW, just a minor nit but you can delete the cond_resched() call > > because kernel_fpu_end()/preempt_enable() will do it anyway. > > That happens under > CONFIG_PREEMPTION=y > (from include/Linux/preempt.h and arch/x86/include/asm/preempt.h) > > Is calling cond_resched() still helpful if that is not the configuration? Perhaps, but then again perhaps if preemption is off, maybe we shouldn't even bother with the 4K split. Were the initial warnings with or without preemption? Personally I don't really care since I always use preemption. The PREEMPT Kconfigs do provide a bit of nuance with the split between PREEMPT_NONE vs. PREEMPT_VOLUNTARY. But perhaps that is just overkill for our situation. I'll leave it to you to decide :) Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt