From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E9F3EB8FD7 for ; Thu, 7 Sep 2023 11:52:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC825440188; Thu, 7 Sep 2023 07:52:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B50BE8E000F; Thu, 7 Sep 2023 07:52:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A390440188; Thu, 7 Sep 2023 07:52:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 826468E000F for ; Thu, 7 Sep 2023 07:52:49 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 4C6A41A0209 for ; Thu, 7 Sep 2023 11:52:49 +0000 (UTC) X-FDA: 81209639658.25.735176F Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on2124.outbound.protection.partner.outlook.cn [139.219.17.124]) by imf09.hostedemail.com (Postfix) with ESMTP id 0405314000C for ; Thu, 7 Sep 2023 11:52:44 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=bilibili.com header.s=selector1 header.b=WxmWez1Y; spf=pass (imf09.hostedemail.com: domain of liwenyu01@bilibili.com designates 139.219.17.124 as permitted sender) smtp.mailfrom=liwenyu01@bilibili.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=reject) header.from=bilibili.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1694087566; a=rsa-sha256; cv=pass; b=A3F6j6nb74XG5YwgylSGaCWu1AjtjCgKuYl5BysvCg9xg51D+vJHFFAw4AORk3Qwa1qUCw SarwdoyTsGykE+8vtgrZe1qkiMyftoamrwfWXTuROrHrZ8vlGp+FeT1Q0pPFA5Psc7C4Y+ TYd5y3eXSJAL6lnfuLggdSigGBkPp3w= ARC-Authentication-Results: i=2; imf09.hostedemail.com; dkim=pass header.d=bilibili.com header.s=selector1 header.b=WxmWez1Y; spf=pass (imf09.hostedemail.com: domain of liwenyu01@bilibili.com designates 139.219.17.124 as permitted sender) smtp.mailfrom=liwenyu01@bilibili.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=reject) header.from=bilibili.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694087566; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=hDbcMvhtqNDEhnloEfQUrKarAglHSQa0UkPBoFmXs5A=; b=3f4UaOZC6GRpb7JiTmdpsrDBvHa9r9NvnT4fXarRo+rWkWTogObbB8PWpcNtccI/pyWhDV ZkzIFqULLWYk6a/9w5n+r4kYu3PJXfAegZm0Yc8+TbG/hwU7Fhq4Dwr5Ls+Vy6oWOcwNeI 6GoZ9uOzIFzVo4u7U4kzOdq3lm1dERU= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iq2FI3bRGKW6zvjI1bqzkNJPbPRpgcxFeORkJSfijjIyx9hBVaVndMPwlMlwoLmfzAdDNx3Tas/jBAv1PTbZw54NwHJ+2Sy0oJqgL9DVmn9F1xaUlHyeCCkcnIhROKRLZ/YmShKtHW8ANt6YWiczu5w8CF5crabrufFsJQ6NHiDeeIlBzIDZNOpBNpAHgsa4jx7I4MnVBDUIwoji1laV6hdHVQXIL3JqcN0bR++t/Xq4/z0q/ebTti3NGCZYJZmyXB1d3tnpI4fQ3a48GCa3Q/844WHz0aGAJpZGbOiJTz3Ht8MQfvxt9/kS1M8RAHWG3YZsZx6Xyp7N8rz8NRouLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hDbcMvhtqNDEhnloEfQUrKarAglHSQa0UkPBoFmXs5A=; b=jX1zvlR42z3huzukHWKTOeQ83BgcEXcV4SU6ceVI240CMeRdmYZQuyfrzoeSa3dDlxQ4G52OAZmn/BgJY8Rd+fM1HUr6C6BOaEdObo1ouvRgVHxz/SiUHSttX4V8vngZZsuQ2eVJIWpAH67bI0e64/0MzTOg81gLqI5NxSmdAv4yFjInYHxtptz3Yl5nELYz7JS94zCmcZsckeLIjLYvDg7wjSnh2d8qP2aV5AfETCnHaGPd+tp0JOZ1hDXSWKQ2NF6AwA9+jeuDmGN2kk44DcnHrSOFxkGAh6W2gKsO+jwVhVXFfI9lKjraux7OQPyYE3wO0tGhLQyAwXgXTofkyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bilibili.com; dmarc=pass action=none header.from=bilibili.com; dkim=pass header.d=bilibili.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bilibili.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hDbcMvhtqNDEhnloEfQUrKarAglHSQa0UkPBoFmXs5A=; b=WxmWez1YY3M0LJco6cK9Gup9p2x7j78sjfm33tQo6tTglSKpGG+7F9gqpfaUgyc0AEFNPyEODmIPVEfiGETbQX/4udoPoGmvbcrlPgpxrEcu1Df0sMYQvGvEgBg62yiTut0oyTG3rVKGp7LAlLafCkbk25pcxREReL3tu9VWX2Y= Received: from SH0PR01MB0587.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:6::16) by SH0PR01MB0604.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.33; Thu, 7 Sep 2023 11:52:35 +0000 Received: from SH0PR01MB0587.CHNPR01.prod.partner.outlook.cn ([fe80::101b:af48:2949:d5f6]) by SH0PR01MB0587.CHNPR01.prod.partner.outlook.cn ([fe80::101b:af48:2949:d5f6%4]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 11:52:35 +0000 From: "liwenyu01@bilibili.com" To: Education Directorate , "akpm@linux-foundation.org" CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "wangyun@bilibili.com" Subject: Re: [PATCH RFC] delayacct: add memory reclaim delay in get_page_from_freelist Thread-Topic: [PATCH RFC] delayacct: add memory reclaim delay in get_page_from_freelist Thread-Index: AQHZ4YHK52SO0gFlKUq6mwmC/V5zsA== Date: Thu, 7 Sep 2023 11:52:35 +0000 Message-ID: References: <20230902164454.30dda58820ced683849b45cb@linux-foundation.org> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SH0PR01MB0587:EE_|SH0PR01MB0604:EE_ x-ms-office365-filtering-correlation-id: aa5d8dcd-47ba-41ac-29ff-08dbaf98ed2d x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: p0St4To/QZcqKUn+ruYS0Am/gB6ZOUUNcBZ0ee5ZjMRw/LNYd3ksFSl7jTtB1X49EzgJCjan9NnvTHFbdGx9cwfzidjJsofXlpkrKV9EXA1E9WjxeAKJJqQC74iQB9bEYtsT20AQEmiaGBHBLO9crBITniuFAGQ1QV+itO6ygKCSIYCb6WUUacZfwNIyQrKvI4bTR3DIg+vbdR8t2N139dqy25ThJoN2bTE+0mskCTKhD9Js6Sy1Wigf9ypELGokWCr95a2lZJ0oTek4achweExUxyFKP0FGIPXy1MUxYIV259wWp5Ul8kEGlLkA9FbkY+mo8+uS/USGD3fDhw1y7MEuWjreoA2DmkcGk46dBSnW/zFrdXLcQyF6WoxnSV7eZkogmbEJLTUkm9awLsezc498Udw9R+H+PE+0eekrC2j89rEsOJdjNOF1b1Lt1xL28cop4Yg6hAIWFzPESVe8Ag+pPB8nFPPoylGeRrVDI0UeHtcVDP8+2OKkiJaWFQzFJhWUpk16dWP5M8/TcWIBV/9+Mp166UekyK/SM8rZ7EdyQbtFOT6Fa0eFdZdbsBVmmJpxbJVyqZB7J6dyKQN6hAqSFIsDaqYo5Q6M5T9xZhnCNnNAu4Avf4hgs8b1vs8PzqL1rpUy/mLEZWbK+eeEKlQytYXzHjxnuXzw6AwC4X8= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SH0PR01MB0587.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230031)(396003)(39830400003)(366004)(136003)(346002)(1800799009)(186009)(451199024)(8676002)(5660300002)(54906003)(110136005)(2906002)(66556008)(64756008)(66946007)(66476007)(76116006)(66446008)(85182001)(8936002)(4326008)(41300700001)(66899024)(55016003)(107886003)(9686003)(7696005)(122000001)(26005)(71200400001)(508600001)(38100700002)(38070700005)(83380400001)(40160700002)(86362001)(40180700001)(33656002)(41320700001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?dUxrcUVpSldSZCtOV0htb0V5Ny92ejIvaHZxbjNxdmxIakdzY2FHWUUz?= =?iso-2022-jp?B?YXNSd1ZTb2J3U1Rad0RuMWlyMVBGLzNabVhnUktDQzlBYnVjazhnRnZO?= =?iso-2022-jp?B?WHYvTlJMVEFOY2lMNThFMUJyNFlVMWpa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p?B?L01WaVVMc3NDRUtLQ3ZXbktReHR3UUpKMjVwUEVNUkp5OXd2c00yUEVq?= =?iso-2022-jp?B?RjhOay83ZzBpdVRjNW90TWg4WXBiVFNzNGc0UU96dVh4U0pqVWw0K1J0?= =?iso-2022-jp?B?SWtJalZSdlVkdmdqOUFFTHdSUEZJTjZDMTR2dzZPQ1NxRUQvdUF1Q3dC?= =?iso-2022-jp?B?dlVYOVBPZGpIU0pNVVJ1Y21EWG1jb1NBbCtYQ2pZU2hLTkJPK29ycjZl?= =?iso-2022-jp?B?bFdyZ3QrZzYrdWZxNVN0NmdkdFVEc0NIVzcrdFQzR0NZNGl2ODJHemRm?= =?iso-2022-jp?B?VW9lZUpiQmFpajRlZkd3UUxKMHNFeHZ0djU1OFB2aGNjbUJGelU0M0V3?= =?iso-2022-jp?B?MERray9weFpwTUU0ZXZJc2VOMUN3RWpIdmc9PQ==?= Content-Type: multipart/alternative; boundary="_000_SH0PR01MB05879FF5D0E4824383BADC11C1EEASH0PR01MB0587CHNP_" MIME-Version: 1.0 X-OriginatorOrg: bilibili.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SH0PR01MB0587.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-Network-Message-Id: aa5d8dcd-47ba-41ac-29ff-08dbaf98ed2d X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2023 11:52:35.1576 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 69bf90e2-5b1b-4f11-976d-fc79a1f174ba X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CZi9+0wIph996ozzXeMQkzVHoKhj3HJ3e+ixqnUyeBBMW2egP2Mx0Bw3enRJymVq5e+ZlK6+WQzA/ZMxc47wIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SH0PR01MB0604 X-Rspamd-Server: rspam08 X-Rspamd-Queue-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hkjfkoH7tiz5gMOLJ5jjzX3AyN8Ku6xtXxS5XOEBU+yEMDaprxlCQqB2Ey06vBjc9ElLTnFTSXf6DAVLd6s2Yiil1gcBYoPnXn3Ey62ARlLfchAIySp7UWVmuVpSF1nmgaLk1rqsl3T/EGezOSRNdyw40w/4hMwGm2/eXs03MNnc8TCD9YtoPHRo37TqpXrVq2TOOEAkc32/wqwE7pKPQtjKiqgoOErCojV+949WCHPKD7RrhytUXdXHXgf212mU0wjaIvI9Fs5exDdxt6ptnCGG2aSGF2AxBHM/m0e9ZFIkGAPYC+xugpC7pSxuLO9jcErzYsHrk07YQ885HUB+dokS9tUWcY2DdzkhbuiS4kPhtM6ChJm/z6fTlxbn/xK8U0+R7wnQYXNuCF/9V0H87MBfz4FkW71b7JbNr10fN2fgpw0Tycy5Ts21zA7u+0Z7Nr21DnMBZvC8hRD0iRDMWqsL3s6N4zPbMgWXzKt01NRSCTnCe9fN6MdaxgCBI2PpjZAeQfyTyDHs+IJQOPdjZd5HFzLZSb55lO4I X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --_000_SH0PR01MB05879FF5D0E4824383BADC11C1EEASH0PR01MB0587CHNP_ Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable >> >> reclaim of the task in do_try_to_free_pages(). In systems with NUMA >> >> open, some tasks occasionally experience slower response times, but t= he >> >> total count of reclaim does not increase, using ftrace can show that >> >> node_reclaim has occurred. >> >> >> >> The memory reclaim occurring in get_page_from_freelist() is also due = to >> >> heavy memory load. To get the impact of tasks in memory reclaim, this >> >> patch adds the statistics of the memory reclaim delay statistics for >> >> __node_reclaim(). >> >> >> >> ... >> >> >> >> --- a/mm/vmscan.c >> >> +++ b/mm/vmscan.c >> >> @@ -8010,6 +8010,7 @@ static int __node_reclaim(struct pglist_data *p= gdat, gfp_t gfp_mask, unsigned in >> >> >> >> cond_resched(); >> >> psi_memstall_enter(&pflags); >> >> + delayacct_freepages_start(); >> >> fs_reclaim_acquire(sc.gfp_mask); >> >> /* >> >> * We need to be able to allocate from the reserves for RECLA= IM_UNMAP >> >> @@ -8032,6 +8033,7 @@ static int __node_reclaim(struct pglist_data *p= gdat, gfp_t gfp_mask, unsigned in >> >> memalloc_noreclaim_restore(noreclaim_flag); >> >> fs_reclaim_release(sc.gfp_mask); >> >> psi_memstall_leave(&pflags); >> >> + delayacct_freepages_end(); >> >> >> >> trace_mm_vmscan_node_reclaim_end(sc.nr_reclaimed); >> > >> > __node_reclaim() calls shrink_node() which at some point will call >> > do_try_to_free_pages() (yes?), which calls delayacct_freepages_start()= . >> > >> > So we're effectively nesting calls to delayacct_freepages_start(), >> > which isn't designed for that? >> > >> sorry, the last reply was a mistake. >> >> It seems that no point in shrink_node() will call do_try_to_free_pages()= . >> And do_try_to_free_pages() will call shrink_node() through shrink_zones(= ), >> if shrink_node() also has some point will call do_try_to_free_pages,then >> delayacct_freepages_start() is nested now? > > That's because shrink_node() goes through shrink_list() via > shrink_lruvec()? do_try_to_free_pages() will call shrink_node(). Ideally > we should have some counters around __node_reclaim() and balance_pgdat() > like psi_memstall_* does. Do you want to mimic what psi_memstall_* does? > This would change the definition of delayacct free pages, but I don't thi= nk > it will make it worse. > > Balbir Singh The focus of delayacct should be the memory recalim delay statistics for each task, and there should be only few direct connections with shrink_node= ()? At least it seems like the using of delayacct_freepages_start() is not wrong right now, so there is unnecessary to implement a new counting method= ? Compared with the delay statistics of balance_pgdat() for kswapd, is it more meaningful to keep the definition of delayacct free pages and only statistics for application? Keep the definition of delayacct free pages, going back to this simple patch, it only does one very simple thing, counting the memory reclaim delay due to memory pressure on the memory allocation path of application. Currently only measure the memory recalim delay in do_try_to_free_pages(), this patch adds statistical points in __node_reclaim(), both do_try_to_free_pages() and __node_reclaim() will call shrink_node(). WenYu =1B$BK\=1B(B?=1B$B7o=1B(B??=1B$B;XDjZ@7o?M;HMQVu2DG=3DJq4^J]L)?.B)!$

= >> >> reclaim of the task in do_try_to_free_pages(). In systems= with NUMA
>> >> open, some tasks occasionally experience slower response = times, but the
>> >> total count of reclaim does not increase, using ftrace ca= n show that
>> >> node_reclaim has occurred.
>> >>
>> >> The memory reclaim occurring in get_page_from_freelist() = is also due to
>> >> heavy memory load. To get the impact of tasks in memory r= eclaim, this
>> >> patch adds the statistics of the memory reclaim delay sta= tistics for
>> >> __node_reclaim().
>> >>
>> >> ...
>> >>
>> >> --- a/mm/vmscan.c
>> >> +++ b/mm/vmscan.c
>> >> @@ -8010,6 +8010,7 @@ static int __node_reclaim(struct pg= list_data *pgdat, gfp_t gfp_mask, unsigned in
>> >>
>> >>         cond_resc= hed();
>> >>         psi_memst= all_enter(&pflags);
>> >> +       delayacct_freepages= _start();
>> >>         fs_reclai= m_acquire(sc.gfp_mask);
>> >>         /*
>> >>          * W= e need to be able to allocate from the reserves for RECLAIM_UNMAP
>> >> @@ -8032,6 +8033,7 @@ static int __node_reclaim(struct pg= list_data *pgdat, gfp_t gfp_mask, unsigned in
>> >>         memalloc_= noreclaim_restore(noreclaim_flag);
>> >>         fs_reclai= m_release(sc.gfp_mask);
>> >>         psi_memst= all_leave(&pflags);
>> >> +       delayacct_freepages= _end();
>> >>
>> >>         trace_mm_= vmscan_node_reclaim_end(sc.nr_reclaimed);
>> >
>> > __node_reclaim() calls shrink_node() which at some point will= call
>> > do_try_to_free_pages() (yes?), which calls delayacct_freepage= s_start().
>> >
>> > So we're effectively nesting calls to delayacct_freepages_sta= rt(),
>> > which isn't designed for that?
>> >
>> sorry, the last reply was a mistake.
>>
>> It seems that no point in shrink_node() will call do_try_to_free_p= ages().
>> And do_try_to_free_pages() will call shrink_node() through shrink_= zones(),
>> if shrink_node() also has some point will call do_try_to_free_page= s,then
>> delayacct_freepages_start() is nested now?
>
> That's because shrink_node() goes through shrink_list() via
> shrink_lruvec()? do_try_to_free_pages() will call shrink_node(). Ideal= ly
> we should have some counters around __node_reclaim() and balance_pgdat= ()
> like psi_memstall_* does. Do you want to mimic what psi_memstall_* doe= s?
> This would change the definition of delayacct free pages, but I don't = think
> it will make it worse.
>
> Balbir Singh


The focus of delayacct should be the memory recalim delay statistics for

= each task, and there should be only few direct connections with shrink_node= ()?

=

At least it seems like the using of delayacct_freepages_start() is not=

= wrong right now, so there is unnecessary to implement a new counting method= ?

=

Compared with the delay statistics of balance_pgdat() for kswapd, is it

= more meaningful to keep the definition of delayacct free pages and only

= statistics for application?

=

Keep the definition of delayacct free pages, going back to this simple=

= patch, it only does one very simple thing, counting the memory reclaim=

= delay due to memory pressure on the memory allocation path of

= application. Currently only measure the memory recalim delay in<= /span>

= do_try_to_free_pages(), this patch adds statistical points in

= __node_reclaim(), both do_try_to_free_pages() and __node_reclaim()

= will call shrink_node().

= WenYu

 

 

=1B$BK\=1B(B邮=1B$B7o=1B(B仅为=1B$B;= XDjZ@7o?M;HMQVu2DG=3DJq4^J]L)?.B)!$

This message may contain confidential information, and is in= tended only for the use of the addressee(s) named above. If you have receiv= ed this message in error, please contact the sender immediately and delete all cop= ies from your system. You are hereby notified that any dissemination, distr= ibution, preservation or copying of this message and/or attachments is stri= ctly prohibited. Thank you for your understanding and cooperation.

--_000_SH0PR01MB05879FF5D0E4824383BADC11C1EEASH0PR01MB0587CHNP_--