From patchwork Thu Jun 28 02:54:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 935864 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41GPYs2MFLz9ry1 for ; Thu, 28 Jun 2018 12:56:33 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41GPYs0q2hzF1Mm for ; Thu, 28 Jun 2018 12:56:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41GPXk1QyhzF1JL for ; Thu, 28 Jun 2018 12:55:33 +1000 (AEST) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5S2s5re119150 for ; Wed, 27 Jun 2018 22:55:30 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0b-001b2d01.pphosted.com with ESMTP id 2jvjy5r4qy-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 27 Jun 2018 22:55:30 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Jun 2018 22:55:30 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 27 Jun 2018 22:55:28 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5S2tRgs10158372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 28 Jun 2018 02:55:27 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AEF27124053; Wed, 27 Jun 2018 23:56:58 -0400 (EDT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C224B124064; Wed, 27 Jun 2018 23:56:57 -0400 (EDT) Received: from birb.localdomain (unknown [9.102.42.25]) by b01ledav002.gho.pok.ibm.com (Postfix) with SMTP; Wed, 27 Jun 2018 23:56:57 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id 860D44EC648; Thu, 28 Jun 2018 12:55:21 +1000 (AEST) From: Stewart Smith To: Nicholas Piggin , Stewart Smith Date: Thu, 28 Jun 2018 12:54:55 +1000 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180418135513.64817b17@roar.ozlabs.ibm.com> References: <20180418135513.64817b17@roar.ozlabs.ibm.com> In-Reply-To: <20180418135513.64817b17@roar.ozlabs.ibm.com> References: <20180418135513.64817b17@roar.ozlabs.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18062802-0068-0000-0000-0000030F5775 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009267; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01053344; UDB=6.00540074; IPR=6.00831268; MB=3.00021894; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-28 02:55:28 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062802-0069-0000-0000-000044D58C8B Message-Id: <20180628025501.20676-1-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-27_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=878 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806280029 Subject: [Skiboot] [RFC v2 PATCH 0/6] Faster fast reboot (2x!) X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: skiboot@lists.ozlabs.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Currently, on a 128GB p9dsu system (with all that memory on node0), it takes around 13 seconds in skiboot to do a fast reboot. By doing the clear in parallel, we get this down to ~11seconds. By then doing it in parallel with PCI scanning, we're down to ~9 seconds. By then caching BOOTKERNEL rather than re-reading it, we're down to ~5seconds. With this patchset, we're down to the following big consumers of time: - 2.5s decompressing initramfs in BOOTKERNEL - the amazing amount of time it takes for a linux OS to get to the point of issuing 'reboot' to firmware. Nicholas Piggin (1): Add cpu_queue_job_on_node() to do node local jobs Stewart Smith (5): fast-reboot: parallel memory clearing Scan PCI and clear memory simultaneously mem_region: log region name on mem_alloc failure mem_check(): Correct alignment assumptions core/flash.c: cache loaded resources core/cpu.c | 77 ++++++++--- core/device.c | 2 +- core/fast-reboot.c | 12 +- core/flash.c | 49 ++++++- core/init.c | 24 ++-- core/mem_region.c | 121 +++++++++++++++++- core/test/dummy-cpu.h | 40 ++++++ core/test/run-malloc-speed.c | 7 +- core/test/run-malloc.c | 7 +- core/test/run-mem_range_is_reserved.c | 8 +- core/test/run-mem_region.c | 10 +- core/test/run-mem_region_init.c | 8 +- core/test/run-mem_region_next.c | 8 +- core/test/run-mem_region_release_unused.c | 8 +- .../run-mem_region_release_unused_noalloc.c | 8 +- core/test/run-mem_region_reservations.c | 8 +- core/test/stubs.c | 44 +++++++ hdata/test/hdata_to_dt.c | 9 ++ hdata/test/stubs.c | 47 +++++++ include/cpu.h | 4 + include/device.h | 5 +- include/mem_region.h | 3 +- include/skiboot.h | 4 +- 23 files changed, 413 insertions(+), 100 deletions(-) create mode 100644 core/test/dummy-cpu.h