Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2304893ybc; Sun, 17 Nov 2019 18:30:12 -0800 (PST) X-Google-Smtp-Source: APXvYqypaMurAdoQfb3Cv2q8rnummemEzbbLuGPYYruYA/5lfWetECJ3MJE8AS/ZbHjCmBJ6iOZR X-Received: by 2002:a17:906:5f81:: with SMTP id a1mr22928856eju.54.1574044212387; Sun, 17 Nov 2019 18:30:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574044212; cv=none; d=google.com; s=arc-20160816; b=lZCefoxsTr4JLJzGJbiNNjmSiFkpJPk7rxXcLcF1db+HxktZk4rYjXR01qC3oG3ySN 8CxiNwYEfItX6+y5N/vswhY7d0bECvjj2LaSaOkXWNBXhSkqxf1AKe0oZUYC68GCEuu7 9/OIFyp0loa/vKmZaG1tIjjIDdjYV1pKaRc/zgWoC29LmqkQX9hYNxea5GMSreZu8HOP Q5k1EpfCsiwEGbd/sT+LWI6TQfCICVopMjJ/kn3jzQ/H9mgDMadGWlWPw9vt3FSq3Ovk 2IViIl4kbIgz2bUe8wZvk3TNkglrlix9xvyP6pYEbmPjDcX8m5THNNIKJ4SH7i/gB1fB rGvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=vnvE+P+znyWzDj088rkAcu9xxb9Oy2iXJX7kwlVpfoA=; b=xyqKG8fSR0eIWOJapis4mAt1BwzCNlW+my8SJymOVumTO718C1KY1ENzaBoXLyLKyz kFM5+TZzp54Ksn3KyX2HqzfZLKf8esK8wE0FG593yuG6NUFLqSBGs13DZSgl9sjHcUT+ E9zTJcUPjkNUAj2LQgG54zBtFE7yLuh4mF4d4lW/qUGiPd1LDk2CJo1G5uasTT1kGz+j k1DR254vcDv3pDITpwOVqkcC/aaedjPa1Pv7eYLfgC4pKz/eEUYtmkmPduJfZ1NecJsK 14UU6LaXT64WJgMdrksdJN7mVp6RfWMpZ+zm4iC0i+BMVKrmDfKTKed9UMkp8fJMlEWN 8COw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si11007327edr.198.2019.11.17.18.29.49; Sun, 17 Nov 2019 18:30:12 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726483AbfKRC2A (ORCPT + 99 others); Sun, 17 Nov 2019 21:28:00 -0500 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:57260 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbfKRC2A (ORCPT ); Sun, 17 Nov 2019 21:28:00 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=shile.zhang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0TiMbjiK_1574044075; Received: from ali-6c96cfdd1403.local(mailfrom:shile.zhang@linux.alibaba.com fp:SMTPD_---0TiMbjiK_1574044075) by smtp.aliyun-inc.com(127.0.0.1); Mon, 18 Nov 2019 10:27:55 +0800 Subject: Re: [RFC PATCH v4 0/7] Speed booting by sorting ORC unwind tables at build time To: hpa@zytor.com, Peter Zijlstra , Josh Poimboeuf , Masahiro Yamada , Michal Marek , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org References: <20191115164539.57930-1-shile.zhang@linux.alibaba.com> <6DC4AA3A-15CA-43B5-B560-5DBB168D3899@zytor.com> From: Shile Zhang Message-ID: Date: Mon, 18 Nov 2019 10:27:55 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <6DC4AA3A-15CA-43B5-B560-5DBB168D3899@zytor.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/18 10:18, hpa@zytor.com wrote: > On November 15, 2019 8:45:32 AM PST, Shile Zhang wrote: >> Hi, >> >> I refactored the code, followed by Peter's suggestions in v3, thank >> you! >> Any suggestions and comments are welcome! >> >> Thanks! >> >> Changelog: >> ========== >> v3->v4: >> - Code refactored for Peter's review findings and suggestions. >> >> v2->v3: >> - Discard new added sortorctable tool and related Kconfig changes. >> - Refactored sortextable, makes it more readable and extendable. >> - Rename 'sortextable' to 'sorttable', for more kernel tables extend. >> - Add ORC unwind tables sort into sorttable. >> - Remove the runtime ORC tables sort. >> https://lore.kernel.org/lkml/20191115064750.47888-1-shile.zhang@linux.alibaba.com/ >> >> v1->v2: >> - Removed new added Kconfig and runtime sort code, advised by Josh >> Poimboeuf. >> - Some minor refactoring. >> https://lore.kernel.org/lkml/20191108071108.72132-1-shile.zhang@linux.alibaba.com/ >> >> v1: >> - Added a new sortorctable tool to sort ORC unwind tables at build >> time, >> same as sortextable. >> - Add a new Kconfigure to control if ORC unwind tables sort at build >> time. >> https://lore.kernel.org/lkml/20191107143205.206606-1-shile.zhang@linux.alibaba.com/ >> >> Shile Zhang (7): >> scripts/sortextable: Rewrite error/success handling >> scripts/sortextable: kernel coding style formating >> scripts/sortextable: Remove dead code >> scripts/sortextable: refactor do_func() function >> scripts/sorttable: rename sortextable to sorttable >> scripts/sorttable: Add ORC unwind tables sort concurrently >> x86/unwind/orc: remove run-time ORC unwind tables sort >> >> arch/arc/Kconfig | 2 +- >> arch/arm/Kconfig | 2 +- >> arch/arm64/Kconfig | 2 +- >> arch/microblaze/Kconfig | 2 +- >> arch/mips/Kconfig | 2 +- >> arch/parisc/Kconfig | 2 +- >> arch/parisc/kernel/vmlinux.lds.S | 2 +- >> arch/powerpc/Kconfig | 2 +- >> arch/s390/Kconfig | 2 +- >> arch/x86/Kconfig | 2 +- >> arch/x86/kernel/unwind_orc.c | 8 +- >> arch/xtensa/Kconfig | 2 +- >> init/Kconfig | 2 +- >> scripts/.gitignore | 2 +- >> scripts/Makefile | 10 +- >> scripts/link-vmlinux.sh | 10 +- >> scripts/sortextable.h | 209 ------------- >> scripts/{sortextable.c => sorttable.c} | 299 +++++++++--------- >> scripts/sorttable.h | 401 +++++++++++++++++++++++++ >> 19 files changed, 568 insertions(+), 395 deletions(-) >> delete mode 100644 scripts/sortextable.h >> rename scripts/{sortextable.c => sorttable.c} (67%) >> create mode 100644 scripts/sorttable.h > Any actual time measurements? Sorry for missed in cover letter! The ORC unwind tables sorting cost about 100ms in boot time on my 2vcpu16GB VM (with 2.5GHz Xeon CPU). After sort at build time, the sorttable needs about 70ms in host. Thanks!