Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4489476rwe; Tue, 30 Aug 2022 11:01:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR43hqa3BDiEXd8noZ2Sc/RaWWS3/vjaXRw5WLiwanktrBCJgA3kp8h+FnKAGRcNPM4ZvQ6U X-Received: by 2002:a17:902:9309:b0:170:c4d5:43ae with SMTP id bc9-20020a170902930900b00170c4d543aemr22316049plb.1.1661882468748; Tue, 30 Aug 2022 11:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661882468; cv=none; d=google.com; s=arc-20160816; b=ZMHgPhmOq+V2SUHO7s9HZWsAXiIJ6PNuygn7srbb600UE6YjlBxuhPHotxVUoh/FjC ITpxBxrBBj6fAM60xtc1hjlaC6hOKLSB/4Jx3EvJOqIkT5Mh2WF4AJSuJi9VBnoB/hbx rHrL4ka8AyG47k32Aq/MMCcDjDkKA1EUiz08r37/rl9EUv6VG9eaBS4yxYNP0lFZtngM LK5CIJZl7ZlZv2cwO6jmxH4wcz3OxtLMr9oeG97YH0wYvX/MwjbEWjpyRFGjN0fFpz1z KujA8VdOrgPn2/OTi4QYBOuugCfk6f7YeSSN5Yf+yfDoPJqaQNxRAR1Rzb1tL4DpHdci dEiA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=tyFODAEOsffjyADdY2hIObvIK/XvFtpvW5BOGh+Sbw4=; b=aVpI9M2Y/lcvC/KOGUNisPmMIbjpCHN5OYXHsw49k7HFKfbyagepYH8QVfepn8f7Xs RZLGzQ4yaxd+KFIPcOvNuX/K6XaSLEV1AKUA0NNCdtav21jCemfOotCvGwxITyWmYH1l Ps+56swyt9p9+oiQAk8NDzH18/bY7iWCNJqDfKy4YfIeXcwi2nZpMxzHt0oSsbLRYvka zDy08nVJA7NG5Xk7KLYo3W0W9SMuJfkfbw9IE35Gnl12ljyB8Wba3vaHqZ4qDA8jaPrL fMerqCd70LTtuDMmVDHVcGwQKgRKjanRxfUbxUUlARPyIjDxHN/u1xihgDxJwrSSMOBr d7bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="SAQ7/m9g"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c11-20020a170903234b00b00172a1134438si2336257plh.453.2022.08.30.11.00.43; Tue, 30 Aug 2022 11:01:08 -0700 (PDT) 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; dkim=pass header.i=@intel.com header.s=Intel header.b="SAQ7/m9g"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbiH3Ros (ORCPT + 99 others); Tue, 30 Aug 2022 13:44:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231592AbiH3RoX (ORCPT ); Tue, 30 Aug 2022 13:44:23 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BCE2F58F for ; Tue, 30 Aug 2022 10:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661881289; x=1693417289; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=69qLIlnVoByyX03jIi4uHWe7L9o2Ja+LIZ86JkNpGL8=; b=SAQ7/m9gmdz6Ub6AuenRaznWzr6WoXuB36OVPaTXDnDFH1fgzajR30Ik mcyAevd40b5Zkqk5bdK8/cqc0M6JjRlyvU3DjRThcT5bUgtN2iYwqHRB8 xMOksclL6a7yIXvEzkI7sMFU45sMfOgC2LrwgPeVZ4E+ZO5LgAAQx4nQb PtNOsUHc0DAgJLQuR/KztqVg/HX9k9unoyK+S2Se/HNT0+fjYcNxJ197q /98qssPbcJqoaJXFNHSyGS+yEeS0m+B5m1cqhMkdR4vxDPyECNCkrgHi+ qHoJZIIhqrCjOWAHZWs7Z+QVMEpLYzubhec+bFPDgoYzguHnGpe8jDvjX A==; X-IronPort-AV: E=McAfee;i="6500,9779,10455"; a="282226899" X-IronPort-AV: E=Sophos;i="5.93,275,1654585200"; d="scan'208";a="282226899" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 10:40:48 -0700 X-IronPort-AV: E=Sophos;i="5.93,275,1654585200"; d="scan'208";a="611802157" Received: from schen9-mobl.amr.corp.intel.com ([10.209.71.199]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 10:40:48 -0700 Message-ID: <75a6faa29066960a74e7b2c60a7ae6acfd1893ab.camel@linux.intel.com> Subject: Re: [PATCH] crypto: x86/sha512 - load based on CPU features From: Tim Chen To: Herbert Xu , "Elliott, Robert (Servers)" Cc: Taehee Yoo , "davem@davemloft.net" , "linux-crypto@vger.kernel.org" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "Kani, Toshi" , "Wright, Randy (HPE Servers Linux)" Date: Tue, 30 Aug 2022 10:40:40 -0700 In-Reply-To: References: <20220813230431.2666-1-elliott@hpe.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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, 2022-08-26 at 10:52 +0800, Herbert Xu wrote: > On Fri, Aug 26, 2022 at 02:40:58AM +0000, Elliott, Robert (Servers) wrote: > > Suggestion: please revert the sha512-x86 patch for a while. > > This problem would have existed anyway if the module was built > into the kernel. > > > Do these functions need to break up their processing into smaller chunks > > (e.g., a few Megabytes), calling kernel_fpu_end() periodically to > > allow the scheduler to take over the CPUs if needed? If so, what > > chunk size would be appropriate? > > Yes these should be limited to 4K each. It appears that all the > sha* helpers in arch/x86/crypto have the same problem. > I think limiting chunk to 4K is reasonable to prevent the CPU from being hogged by the crypto code for too long. Tim