Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4710842ybc; Fri, 15 Nov 2019 08:53:11 -0800 (PST) X-Google-Smtp-Source: APXvYqw1TwKgewDqs+wcP/nZVtjchvSlT9tr+6OsViArxvGsS3hWinOsPCeeClyAO9DVB7pWouZE X-Received: by 2002:a17:906:b5b:: with SMTP id v27mr2095983ejg.327.1573836791687; Fri, 15 Nov 2019 08:53:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573836791; cv=none; d=google.com; s=arc-20160816; b=Eq0SvVNbeNRwG/WymEGZmw6XCv58jc18DQHUznsX8TZE6b21Ndoq/9nhaCRO1Q4ye9 M6gdDRaZltVZwtUpyKfk44l5ap55n353pC8Pp/FeWwoZ3Rl1hxG/0iJpaC4/hKjO4yYE hL0Lw6yR93W6VV80QKND1qpWDJiJx/a+SVZtTR60oA6Pyo9IAF+e92UAUq87NYHX4Ulp nzEgWnRHWNvSWGLj/m34JuO1Di8WKXcPBpAKVt2vMxhjT8z/W1DTliAn7eww+QcDQgoK daqlszuvn1QDGDKrdXUXKQ2xhz87rlVZilzWpQWFbkqi0jB+oeICpYXMt3vVv9Vo5y2l 7OYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=rTXJsHEdY9BWD+yNxr5TNf0LqAgRdd02pdMcocfQ5vE=; b=cZZ3XwAbWc62jRHauqFFE18N608RFpPUQuRXvsWXd08sNizYN0OqWkYLxkAIn+e09Q VOeBs++MJf0O7tg9eaPk7KVMj/UoNtRX1crcwgJ7bVsgC0a82CZUzBuK7UTDyOpZZwQ1 xaXXE0Tla3dW0iZ6RuhqyuEnJZHnt8V0M2wD7QU2VaJm6nilkQiJjwn3896TyrigwHSC C78G18GMczIpiEcdpp4jiokvkekcDrDRbdlk/aenVIaVR1y1iZ8fCsqNyoeewiY7nZNO 86H65Sh96DYLIuxdY2CKA70YBNfxwmzXEivxpuzVc7jfPzkozoP4rJOIA9mbsBWdLiFX SurQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v18si5888589ejd.115.2019.11.15.08.52.46; Fri, 15 Nov 2019 08:53:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727680AbfKOQva convert rfc822-to-8bit (ORCPT + 99 others); Fri, 15 Nov 2019 11:51:30 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:35163 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727555AbfKOQva (ORCPT ); Fri, 15 Nov 2019 11:51:30 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-28-JYU6DzG4PJauNrdBTvHnwQ-1; Fri, 15 Nov 2019 16:51:25 +0000 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 15 Nov 2019 16:51:24 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Fri, 15 Nov 2019 16:51:24 +0000 From: David Laight To: 'Shile Zhang' , Peter Zijlstra , Josh Poimboeuf , Masahiro Yamada , Michal Marek , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "x86@kernel.org" CC: "H . Peter Anvin" , "linux-kernel@vger.kernel.org" , "linux-kbuild@vger.kernel.org" Subject: RE: [RFC PATCH v3 7/7] x86/unwind/orc: remove run-time ORC unwind tables sort Thread-Topic: [RFC PATCH v3 7/7] x86/unwind/orc: remove run-time ORC unwind tables sort Thread-Index: AQHVm4CqL2sS2uy4n0+BG1AUQK0Os6eMck/g Date: Fri, 15 Nov 2019 16:51:24 +0000 Message-ID: <893d3caf85cd4ed0921fab84cfe28cad@AcuMS.aculab.com> References: <20191115064750.47888-1-shile.zhang@linux.alibaba.com> <20191115064750.47888-8-shile.zhang@linux.alibaba.com> In-Reply-To: <20191115064750.47888-8-shile.zhang@linux.alibaba.com> Accept-Language: en-GB, en-US Content-Language: 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 X-MC-Unique: JYU6DzG4PJauNrdBTvHnwQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shile Zhang > Sent: 15 November 2019 06:48 ... > arch/x86/kernel/unwind_orc.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c > index 332ae6530fa8..280da6fa9922 100644 > --- a/arch/x86/kernel/unwind_orc.c > +++ b/arch/x86/kernel/unwind_orc.c > @@ -273,9 +273,11 @@ void __init unwind_init(void) > return; > } > > - /* Sort the .orc_unwind and .orc_unwind_ip tables: */ > - sort(__start_orc_unwind_ip, num_entries, sizeof(int), orc_sort_cmp, > - orc_sort_swap); > + /* > + * Note, orc_unwind and orc_unwind_ip tables has been sorted in > + * vmlinux link phase by sorttable tool at build time. > + * Its ready for binary search now. > + */ How fast is sort() if the table is sorted? Relying on the kernel sources and build scripts always being in sync seems dangerous. Probably better to leave the sort in for a release of two. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)