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 C4E2AC433EF for ; Thu, 2 Dec 2021 14:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358519AbhLBO2T (ORCPT ); Thu, 2 Dec 2021 09:28:19 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:32739 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347257AbhLBO2Q (ORCPT ); Thu, 2 Dec 2021 09:28:16 -0500 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-247-y_GkXO8bMxqxV80CMcQfCQ-1; Thu, 02 Dec 2021 14:24:49 +0000 X-MC-Unique: y_GkXO8bMxqxV80CMcQfCQ-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Thu, 2 Dec 2021 14:24:48 +0000 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.026; Thu, 2 Dec 2021 14:24:48 +0000 From: David Laight To: 'Noah Goldstein' CC: Eric Dumazet , "tglx@linutronix.de" , "mingo@redhat.com" , Borislav Petkov , "dave.hansen@linux.intel.com" , X86 ML , "hpa@zytor.com" , "peterz@infradead.org" , "alexanderduyck@fb.com" , open list , netdev Subject: RE: [PATCH v1] x86/lib: Optimize 8x loop and memory clobbers in csum_partial.c Thread-Topic: [PATCH v1] x86/lib: Optimize 8x loop and memory clobbers in csum_partial.c Thread-Index: AQHX4nNzHa79im/GnUeKV4t1ya1z3awZWESAgAAYhYCABdIhIA== Date: Thu, 2 Dec 2021 14:24:47 +0000 Message-ID: <29cf408370b749069f3b395781fe434c@AcuMS.aculab.com> References: <20211125193852.3617-1-goldstein.w.n@gmail.com> <8e4961ae0cf04a5ca4dffdec7da2e57b@AcuMS.aculab.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SSd2ZSBkdWcgb3V0IG15IHRlc3QgcHJvZ3JhbSBhbmQgbWVhc3VyZWQgdGhlIHBlcmZvcm1hbmNl IG9mDQp2YXJpb3VzIGNvcGllZCBvZiB0aGUgaW5uZXIgbG9vcCAtIHVzdWFsbHkgNjQgYnl0ZXMv aXRlcmF0aW9uLg0KQ29kZSBpcyBiZWxvdy4NCg0KSXQgdXNlcyB0aGUgaGFyZHdhcmUgcGVyZm9y bWFuY2UgY291bnRlciB0byBnZXQgdGhlIG51bWJlciBvZg0KY2xvY2tzIHRoZSBpbm5lciBsb29w IHRha2VzLg0KVGhpcyBpcyByZWFzb25hYmxlIHN0YWJsZSBvbmNlIHRoZSBicmFuY2ggcHJlZGlj dG9yIGhhcyBzZXR0bGVkIGRvd24uDQpTbyB0aGUgZGlmZmVyZW50IGluIGNsb2NrcyBiZXR3ZWVu IGEgNjQgYnl0ZSBidWZmZXIgYW5kIGEgMTI4IGJ5dGUNCmJ1ZmZlciBpcyB0aGUgbnVtYmVyIG9m IGN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IHVuc2lnbmVkIGxvbmcgbGVuKQ0Kew0KI2lmIE1PREUgPT0gMA0K Ly8gU2ltcGxlICdhZGMnIGxvb3AsIGFicyBtYXggOCBieXRlcy9jbG9jay4NCi8vIFdpbGwgYmUg dmVyeSBzbG93IG9uIG9sZCBjcHUgKFByZSBJdnkgYnJpZGdlKSBjcHUgd2hlcmUgJ2RlYycNCi8v IGhhcyBhIGZhbHNlIGRlcGVuZGVuY3kgYWdhaW5zdCB0aGUgY2FycnkgZmxhZy4NCi8vIE5lYXJs eSBhcyBnb29kIGlmIGRvaW5nIDMyIGJ5dGVzL2l0ZXJhdGlvbi4NCiNkZWZpbmUgREZMVF9PRkZT RVQgNDANCiAgICAgICAgbG9uZyBjb3VudCA9IGxlbi8zMjsNCiAgICAgICAgYXNtKCIgICBjbGNc biINCiAgICAgICAgICAgICIxOiBhZGNxICAgICglW2J1ZmZdKSwgJVtjc3VtXVxuIg0KICAgICAg ICAgICAgIiAgIGFkY3EgICAgOCglW2J1ZmZdKSwgJVtjc3VtXVxuIg0KICAgICAgICAgICAgIiAg IGFkY3EgICAgMTYoJVtidWZmXSksICVbY3N1bV1cbiINCiAgICAgICAgICAgICIgICBhZGNxICAg IDI0KCVbYnVmZl0pLCAlW2NzdW1dXG4iDQogICAgICAgICAgICAiICAgbGVhICAgICAzMiglW2J1 ZmZdKSwgJVtidWZmXVxuIg0KICAgICAgICAgICAgIiAgIGRlYyAgICAgJVtjb3VudF1cbiINCiAg ICAgICAgICAgICIgICBqbnogICAgIDFiXG4iDQogICAgICAgICAgICAiICAgYWRjcSAgICAkMCwg JVtjc3VtXVxuIg0KICAgICAgICAgICAgICAgIDogW2NzdW1dICIrJnIiIChjc3VtKSwgW2xlbl0g IismciIgKGxlbiksIFtjb3VudF0gIismciIgKGNvdW50KQ0KICAgICAgICAgICAgICAgIDogW2J1 ZmZdICJyIiAoYnVmZikNCiAgICAgICAgICAgICAgICA6ICJtZW1vcnkiKTsNCiNlbmRpZg0KDQoj aWYgTU9ERSA9PSAxDQovLyBBbHRlcm5hdGUgJ2FkYycgbG9vcCB0aGF0IGF2b2lkcyB1c2luZyB0 aGUgY2FycnkgZmxhZy4NCiNkZWZpbmUgREZMVF9PRkZTRVQgNDANCiAgICAgICAgYnVmZiArPSBs ZW47DQogICAgICAgIGxlbiA9IC1sZW47DQogICAgICAgIGFzbSgiICAgY2xjXG4iDQogICAgICAg ICAgICAiMToganJjeHogICAyZlxuIg0KICAgICAgICAgICAgIiAgIGFkY3EgICAgMCglW2J1ZmZd LCAlW2xlbl0pLCAlW2NzdW1dXG4iDQogICAgICAgICAgICAiICAgYWRjcSAgICA4KCVbYnVmZl0s ICVbbGVuXSksICVbY3N1bV1cbiINCiAgICAgICAgICAgICIgICBhZGNxICAgIDE2KCVbYnVmZl0s ICVbbGVuXSksICVbY3N1bV1cbiINCiAgICAgICAgICAgICIgICBhZGNxICAgIDI0KCVbYnVmZl0s ICVbbGVuXSksICVbY3N1bV1cbiINCiAgICAgICAgICAgICIgICBsZWEgICAgIDMyKCVbbGVuXSks ICVbbGVuXVxuIg0KICAgICAgICAgICAgIiAgIGptcCAgICAgMWJcbiINCiAgICAgICAgICAgICIy OiBhZGNxICAgICQwLCAlW2NzdW1dXG4iDQogICAgICAgICAgICAgICAgOiBbY3N1bV0gIismciIg KGNzdW0pLCBbbGVuXSAiKyZjIiAobGVuKQ0KICAgICAgICAgICAgICAgIDogW2J1ZmZdICJyIiAo YnVmZikNCiAgICAgICAgICAgICAgICA6ICJtZW1vcnkiKTsNCiNlbmRpZg0KDQojaWYgTU9ERSA9 PSAyDQovLyBFeGlzdGluZyBrZXJuZWwgbG9vcC4NCi8vIFRoZSBhZGMgY2hhaW4gbGltaXRzIGl0 IHRvIGFib3V0IDggYnl0ZXMvY2xvY2suDQojZGVmaW5lIERGTFRfT0ZGU0VUIDQwDQogICAgICAg IGxvbmcgY291bnQgPSBsZW4vNjQ7DQogICAgICAgIGFzbSgiMTogYWRkcSAgICAwKCVbYnVmZl0p LCAlW2NzdW1dXG4iDQogICAgICAgICAgICAiICAgYWRjcSAgICA4KCVbYnVmZl0pLCAlW2NzdW1d XG4iDQogICAgICAgICAgICAiICAgYWRjcSAgICAxNiglW2J1ZmZdKSwgJVtjc3VtXVxuIg0KICAg ICAgICAgICAgIiAgIGFkY3EgICAgMjQoJVtidWZmXSksICVbY3N1bV1cbiINCiAgICAgICAgICAg ICIgICBhZGNxICAgIDMyKCVbYnVmZl0pLCAlW2NzdW1dXG4iDQogICAgICAgICAgICAiICAgYWRj cSAgICA0MCglW2J1ZmZdKSwgJVtjc3VtXVxuIg0KICAgICAgICAgICAgIiAgIGFkY3EgICAgNDgo JVtidWZmXSksICVbY3N1bV1cbiINCiAgICAgICAgICAgICIgICBhZGNxICAgIDU2KCVbYnVmZl0p LCAlW2NzdW1dXG4iDQogICAgICAgICAgICAiICAgYWRjcSAgICAkMCwgJVtjc3VtXVxuIg0KICAg ICAgICAgICAgIiAgIGxlYSAgICAgNjQoJVtidWZmXSksICVbYnVmZl1cbiINCiAgICAgICAgICAg ICIgICBkZWMgICAgICVbY291bnRdXG4iDQogICAgICAgICAgICAiICAgam56ICAgICAxYiINCiAg ICAgICAgICAgICAgICA6IFtjc3VtXSAiKyZyIiAoY3N1bSksIFtsZW5dICIrJnIiIChsZW4pLCBb Y291bnRdICIrJnIiIChjb3VudCkNCiAgICAgICAgICAgICAgICA6IFtidWZmXSAiciIgKGJ1ZmYp DQogICAgICAgICAgICAgICAgOiAibWVtb3J5Iik7DQojZW5kaWYNCg0KI2lmIE1PREUgPT0gMw0K Ly8gUHJvcG9zZWQga2VybmVsIGxvb3AuDQovLyBUaGlzIHNwbGl0cyB0aGUgYWRjIGNoYWluIGlu IHR3by4NCi8vIEZhc3RlciB0aGFuICgyKSBmb3Igc2hvcnQgYnVmZmVycyAtIG5vdCBzdXJlIHdo eS4NCiNkZWZpbmUgREZMVF9PRkZTRVQgMzgNCiAgICAgICAgbG9uZyBjb3VudCA9IGxlbi82NDsN CiAgICAgICAgdW5zaWduZWQgbG9uZyBjc3VtMTsNCiAgICAgICAgYXNtKCIxOiBtb3ZxICAgIDAo JVtidWZmXSksICVbY3N1bTFdXG4iDQogICAgICAgICAgICAiICAgYWRjcSAgICA4KCVbYnVmZl0p LCAlW2NzdW0xXVxuIg0KICAgICAgICAgICAgIiAgIGFkY3EgICAgMTYoJVtidWZmXSksICVbY3N1 bTFdXG4iDQogICAgICAgICAgICAiICAgYWRjcSAgICAyNCglW2J1ZmZdKSwgJVtjc3VtMV1cbiIN CiAgICAgICAgICAgICIgICBhZGNxICAgIDMyKCVbYnVmZl0pLCAlW2NzdW0xXVxuIg0KICAgICAg ICAgICAgIiAgIGFkY3EgICAgJDAsICVbY3N1bTFdXG4iDQogICAgICAgICAgICAiICAgbGVhICAg ICA2NCglW2J1ZmZdKSwgJVtidWZmXVxuIg0KICAgICAgICAgICAgIiAgIGFkZHEgICAgNDAtNjQo JVtidWZmXSksICVbY3N1bV1cbiINCiAgICAgICAgICAgICIgICBhZGNxICAgIDQ4LTY0KCVbYnVm Zl0pLCAlW2NzdW1dXG4iDQogICAgICAgICAgICAiICAgYWRjcSAgICA1Ni02NCglW2J1ZmZdKSwg JVtjc3VtXVxuIg0KICAgICAgICAgICAgIiAgIGFkY3EgICAgJVtjc3VtMV0sICVbY3N1bV1cbiIN CiAgICAgICAgICAgICIgICBhZGNxICAgICQwLCAlW2NzdW1dXG4iDQogICAgICAgICAgICAiICAg ZGVjICAgICAlW2NvdW50XVxuIg0KICAgICAgICAgICAgIiAgIGpueiAgICAgMWIiDQogICAgICAg ICAgICAgICAgOiBbY3N1bV0gIismciIgKGNzdW0pLCBbY3N1bTFdICI9JnIiIChjc3VtMSksIFts ZW5dICIrJnIiIChsZW4pLCBbY291bnRdICIrJnIiIChjb3VudCkNCiAgICAgICAgICAgICAgICA6 IFtidWZmXSAiciIgKGJ1ZmYpDQogICAgICAgICAgICAgICAgOiAibWVtb3J5Iik7DQojZW5kaWYN Cg0KI2lmIE1PREUgPT0gNA0KLy8gTGVzcyB1bnJvbGxlZCB2ZXJzaW9uIG9mICgzKS4NCi8vIE1h eWJlIGp1c3QgYXMgZmFzdCENCiNkZWZpbmUgREZMVF9PRkZTRVQgNDMNCiAgICAgICAgbG9uZyBj b3VudCA9IGxlbjsNCiAgICAgICAgdW5zaWduZWQgbG9uZyBjc3VtMTsNCiAgICAgICAgYXNtKCIx OiBtb3ZxICAgIDAoJVtidWZmXSksICVbY3N1bTFdXG4iDQogICAgICAgICAgICAiICAgYWRjcSAg ICA4KCVbYnVmZl0pLCAlW2NzdW0xXVxuIg0KICAgICAgICAgICAgIiAgIGFkY3EgICAgJDAsICVb Y3N1bTFdXG4iDQogICAgICAgICAgICAiICAgbGVhICAgICAzMiglW2J1ZmZdKSwgJVtidWZmXVxu Ig0KICAgICAgICAgICAgIiAgIGFkZHEgICAgMTYtMzIoJVtidWZmXSksICVbY3N1bV1cbiINCiAg ICAgICAgICAgICIgICBhZGNxICAgIDI0LTMyKCVbYnVmZl0pLCAlW2NzdW1dXG4iDQogICAgICAg ICAgICAiICAgYWRjcSAgICAlW2NzdW0xXSwgJVtjc3VtXVxuIg0KICAgICAgICAgICAgIiAgIGFk Y3EgICAgJDAsICVbY3N1bV1cbiINCiAgICAgICAgICAgICIgICBzdWIgICAgICQzMiwgJVtjb3Vu dF1cbiINCiAgICAgICAgICAgICIgICBqbnogICAgIDFiIg0KICAgICAgICAgICAgICAgIDogW2Nz dW1dICIrJnIiIChjc3VtKSwgW2NzdW0xXSAiPSZyIiAoY3N1bTEpLCBbbGVuXSAiKyZyIiAobGVu KSwgW2NvdW50XSAiKyZyIiAoY291bnQpDQogICAgICAgICAgICAgICAgOiBbYnVmZl0gInIiIChi dWZmKQ0KICAgICAgICAgICAgICAgIDogIm1lbW9yeSIpOw0KI2VuZGlmDQoNCiNpZiBNT0RFID09 IDUNCi8vIGFkeGMvYWR4byBsb29wLg0KLy8gVGhpcyBpcyB0aGUgb25seSBsb29wIHRoYXQgZXhj ZWVkcyA4IGJ5dGVzL2Nsb2NrIGZvciAxayBidWZmZXJzLg0KI2RlZmluZSBERkxUX09GRlNFVCA0 MA0KICAgICAgICB1bnNpZ25lZCBsb25nIGNzdW1fb2RkOw0KICAgICAgICBidWZmICs9IGxlbjsN CiAgICAgICAgbGVuID0gLWxlbjsNCiAgICAgICAgYXNtKCAgICAiICAgICAgIHhvciAgICVbY3N1 bV9vZGRdLCAlW2NzdW1fb2RkXVxuIiAgICAvLyBBbHNvIGNsZWFycyBjYXJyeSBhbmQgb3ZlcmZs b3cNCiAgICAgICAgICAgICAgICAiMTA6ICAgIGpyY3h6IDIwZlxuIg0KICAgICAgICAgICAgICAg ICIgICAgICAgYWRjeCAgICAoJVtidWZmXSwgJVtsZW5dKSwgJVtjc3VtXVxuIg0KICAgICAgICAg ICAgICAgICIgICAgICAgYWRveCAgIDgoJVtidWZmXSwgJVtsZW5dKSwgJVtjc3VtX29kZF1cbiIN CiAgICAgICAgICAgICAgICAiICAgICAgIGFkY3ggIDE2KCVbYnVmZl0sICVbbGVuXSksICVbY3N1 bV1cbiINCiAgICAgICAgICAgICAgICAiICAgICAgIGFkb3ggIDI0KCVbYnVmZl0sICVbbGVuXSks ICVbY3N1bV9vZGRdXG4iDQogICAgICAgICAgICAgICAgIiAgICAgICBhZGN4ICAzMiglW2J1ZmZd LCAlW2xlbl0pLCAlW2NzdW1dXG4iDQogICAgICAgICAgICAgICAgIiAgICAgICBhZG94ICA0MCgl W2J1ZmZdLCAlW2xlbl0pLCAlW2NzdW1fb2RkXVxuIg0KICAgICAgICAgICAgICAgICIgICAgICAg YWRjeCAgNDgoJVtidWZmXSwgJVtsZW5dKSwgJVtjc3VtXVxuIg0KICAgICAgICAgICAgICAgICIg ICAgICAgYWRveCAgNTYoJVtidWZmXSwgJVtsZW5dKSwgJVtjc3VtX29kZF1cbiINCiAgICAgICAg ICAgICAgICAiICAgICAgIGxlYSAgIDY0KCVbbGVuXSksICVbbGVuXVxuIg0KICAgICAg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PSByZHBtYyhp ZCk7DQogICAgICAgICAgICAgICAgY3N1bSA9IGNzdW02NCgwLCBidWZmICsgb2ZmLCBsZW4pOw0K ICAgICAgICAgICAgICAgIHRpY2tzW2ldID0gcmRwbWMoaWQpIC0gdGljazsNCiAgICAgICAgfQ0K DQogICAgICAgIHByaW50ZigiICAgdGlja3MgICAgcmF0ZSAlbHhcbiIsIGNzdW0pOw0KICAgICAg ICBmb3IgKGkgPSAwOyBpIDwgUEFTU0VTOyBpKyspDQogICAgICAgICAgICAgICAgcHJpbnRmKCIg JTd1ICU3dVxuIiwgdGlja3NbaV0sIDEwMCAqIGxlbiAvICh0aWNrc1tpXSAtIE9GRlNFVCkpOw0K ICAgICAgICByZXR1cm4gMDsNCn0NCg0KLQ0KUmVnaXN0ZXJlZCBBZGRyZXNzIExha2VzaWRlLCBC cmFtbGV5IFJvYWQsIE1vdW50IEZhcm0sIE1pbHRvbiBLZXluZXMsIE1LMSAxUFQsIFVLDQpSZWdp c3RyYXRpb24gTm86IDEzOTczODYgKFdhbGVzKQ0K