Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5202342pxu; Tue, 22 Dec 2020 10:45:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxB6N9C/TwrLN8FSDwjdAjRza716DsN5IGpFXDRUOJHwHfF+bb8oo5DohLc3RatJ+02MnA3 X-Received: by 2002:a05:6402:6c9:: with SMTP id n9mr21581324edy.43.1608662738897; Tue, 22 Dec 2020 10:45:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608662738; cv=none; d=google.com; s=arc-20160816; b=lVXaUgAEbMI8c9EISWj6OY+wIi2PECXGLnWnr4+TzTdGGZ59RiewTb4GA42/Xtxk/w WHBmMtIWxozsC1LBgIKh1iJC3biOV8386U03nevk+pLGszDw/2JQtRO7suNT01nfDIZa 34bZfDbzb/J0DJQsK7Dg8dpeUAOcJqmX2TFnSMHFRiCdS7TvfZhtC/QjkiQKTb3ZVI24 UkagdiWXS0mSR4vcYVA7ex3AK3fDlcb7ELBfdRlmPFTrCuVMgy1SoHStNN4+8GbWxNkc nKWAiSUsz5ZNiyxtBNNyRIL47Cbpo/yxVmnlDjcfix/2En5MBuYAbUMHpmb/9dgiwuqK rIiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=qfBbDIme+fpfpmG78YSWKYpldO04DbLztHvOJaKuH7A=; b=RTyRKB1EpgGUiQ9h7cXneWGPxTgrIf32DiycwNi5BKXZVSuQhOEm0TlgAb+LBsJ0nx M6v2KPdqe1umKNXgX5p5vPXJ4HxrKwZKMoudLHLE6YB+Ghw5EoDaDYC3oIY7RB/+5jQX x3sonK5HTlhHZgviyqSonOs9RDAzrkelQRcbkBf+86opnjRn6DVF6HVNcZEBzT8HBbgx LoWO07L/hVWOwskl4lz1+phxtjH/WfTR80rHjUYmLZ984VUbqWhOKTkH1qU2cb1qA6/h k4ELWgPE0gF6cg1YeyRx85nRsVZUkexX7NV9+0eGZBKrq2wDr11Y+h6topaqdfBfkkKt cMVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n27si11074841ejc.673.2020.12.22.10.45.13; Tue, 22 Dec 2020 10:45:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726158AbgLVSoa convert rfc822-to-8bit (ORCPT + 99 others); Tue, 22 Dec 2020 13:44:30 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:20188 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725967AbgLVSo3 (ORCPT ); Tue, 22 Dec 2020 13:44:29 -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-216-NzeuVMnNNqCo6nmnfbI2nQ-1; Tue, 22 Dec 2020 18:42:50 +0000 X-MC-Unique: NzeuVMnNNqCo6nmnfbI2nQ-1 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; Tue, 22 Dec 2020 18:42:49 +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; Tue, 22 Dec 2020 18:42:49 +0000 From: David Laight To: "'qianjun.kernel@gmail.com'" , "akpm@linux-foundation.org" CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 1/1] mm:improve the performance during fork Thread-Topic: [PATCH 1/1] mm:improve the performance during fork Thread-Index: AQHW2FzhXFuZ8KmDFkCjkZcJPkqDtKoDcq7g Date: Tue, 22 Dec 2020 18:42:49 +0000 Message-ID: References: <20201222121904.50845-1-qianjun.kernel@gmail.com> In-Reply-To: <20201222121904.50845-1-qianjun.kernel@gmail.com> 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: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: qianjun > Sent: 22 December 2020 12:19 > > In our project, Many business delays come from fork, so > we started looking for the reason why fork is time-consuming. > I used the ftrace with function_graph to trace the fork, found > that the vm_normal_page will be called tens of thousands and > the execution time of this vm_normal_page function is only a > few nanoseconds. And the vm_normal_page is not a inline function. > So I think if the function is inline style, it maybe reduce the > call time overhead. Beware of taking timings from ftrace function trace. The cost of the tracing is significant. You can get sensible numbers if you only trace very specific functions. Slightly annoyingly the output format changes if you enable the function exit trace - useful for the timestamp. ISTR it is possible to get the process id traced if you fiddle with enough options. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)