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 2802FC54EBE for ; Fri, 13 Jan 2023 09:05:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5C9868E0002; Fri, 13 Jan 2023 04:04:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 579DF8E0001; Fri, 13 Jan 2023 04:04:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 441458E0002; Fri, 13 Jan 2023 04:04:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3242E8E0001 for ; Fri, 13 Jan 2023 04:04:59 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 0168A1A07D0 for ; Fri, 13 Jan 2023 09:04:58 +0000 (UTC) X-FDA: 80349191118.22.37D6158 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by imf21.hostedemail.com (Postfix) with ESMTP id 2D46F1C000E for ; Fri, 13 Jan 2023 09:04:54 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=aculab.com; spf=pass (imf21.hostedemail.com: domain of david.laight@aculab.com designates 185.58.86.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673600697; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WCV4V7pEzr+4kdNicOc/UKU2yiK9xPKHZsBGCHuvH+w=; b=lsjW3jVfZ4YZXjwDK+GU69U+zEDGG4MvlBhvKozJDDjaPb4xilAZ3UbSej2FYckyqp0Pzt vibIfqxfC8ww6sbuVcXydt74pilxtWtLpywv5K44h8m/gmwqO8reHAJISSYN8Gl+xPUK6O Uiza7ZSuFQvMGDWSYeJTWuxipf9myHs= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=aculab.com; spf=pass (imf21.hostedemail.com: domain of david.laight@aculab.com designates 185.58.86.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673600697; a=rsa-sha256; cv=none; b=rW/8raLpyD0VtQrUKwun64/77Dh2WFMSueSgr9tOWuE7TXiuDTxVkCZsaZI+UMwnWtHjbm /lf+Fnk+Jwx2bKK4gRBFBFC9vgPT1vusKwmJqM28CIqoEW5q2o4NFN/5owcmioKuAXX55p VRrg3Wy92RrK9NlvIFyrtnCS7ZztO7U= Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-213-8NbXl33pMYu5sfuK1Wbrsw-1; Fri, 13 Jan 2023 09:04:52 +0000 X-MC-Unique: 8NbXl33pMYu5sfuK1Wbrsw-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 13 Jan 2023 09:04:50 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.044; Fri, 13 Jan 2023 09:04:50 +0000 From: David Laight To: 'Mel Gorman' , Michal Hocko CC: Linux-MM , Andrew Morton , NeilBrown , Thierry Reding , "Matthew Wilcox" , Vlastimil Babka , LKML Subject: RE: [PATCH 2/7] mm/page_alloc: Treat RT tasks similar to __GFP_HIGH Thread-Topic: [PATCH 2/7] mm/page_alloc: Treat RT tasks similar to __GFP_HIGH Thread-Index: AQHZJmoXf1CytyX+t0K5Vu0irpkuJa6cCxcQ Date: Fri, 13 Jan 2023 09:04:50 +0000 Message-ID: <4c169ca43a7b49f1bf61c01181ed585e@AcuMS.aculab.com> References: <20230109151631.24923-1-mgorman@techsingularity.net> <20230109151631.24923-3-mgorman@techsingularity.net> <20230112093623.sl4jpqf6f2ng43w2@techsingularity.net> In-Reply-To: <20230112093623.sl4jpqf6f2ng43w2@techsingularity.net> 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 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 2D46F1C000E X-Stat-Signature: uuybk1hokirjyxn94jawujmecdnm63on X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1673600694-963784 X-HE-Meta: U2FsdGVkX18tG2FYWMYN6gQuRMXo3D/p0QC5/H6tVtoeBk8Bhy0Cwyuh7SSnsL6LFkTgY5rD0cY6EPhIRF51V46XTR/BaRFqLaPI4KQOjzJedQnU/pkJP7VhxufFGEeNB6y4t+rI97+z1woRoY7cvSPrFx5ReebMEUpNPRfjzorsIq6Ftl2Ub9oXmtIu2vfy+3XzeekFzxfhPK6PR//zgYKIrhI6apbHTlBcd3xaJ1O3D9xi/yFtwVRjcbVDQu465O8fHWTndxNVW0X0i2pK47Dum3sNKLi0i+O8OrMRPGV6F8nP9TiXyDEghX7DnbPM0EH/jV9K9DrwnlcaA6JqzpddjCuErQ6bVZC4hSG7h0vEpquegCrOlslumUcYGN8EBtf2dgcignWBVzyeT4Kq61JCUE67Ox8xOOysy7sy7UGxSBZ2BocZQU8sMw265ZkkbZBbABw2TVZqiyjDwUNDozkpG4k4aNUzhW+K3qpKHRh7QxX/3vimsVLHnA0i5KAvjHnx2k/zepQ0yKrHkWmNMIqgNT0cncsy8LHaTxcH/IhBGby3JhUtonAzS8DW8DcPU/n95TfwC8uFIH0aGQguP07QVo9Scl4w69/W7yzx1ytiS2xeHXSjZrhBuLnmqBr0V7cG+FEc8fKMmlZ6aEyeAHLbADDkq3aRkLvZsY2pGFJQeAv7wymIXXB5VZBGN6mx88hSdlPDSJe03KEiTWDQbPMQXsgEXm7bxbcS9rMMTljFZvhNAM+oxc0FLt6XylzSwq1+IyFXAuWoxLhDmUH60lkXKG7wvBjD/1ox/7/5melEnATH0ACqC2/tu2RdF/Jqjbk5BDDGqJfFgGAM7TRC3/0QbR0BQxPsHRZTIBjKsgN4Y3Z5IDcL59aVFiXQhnqZ1kjHqpiBrTvIBBLe7/Kc2yRVy3pBagClISrxUqG2lkutN6RzEPnTdx0MltbCYR4A8Ua5Ro5B7eX3dWUgR9Q 8ihU6D/V wy8eD 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: From: Mel Gorman > Sent: 12 January 2023 09:36 ... > Hard realtime tasks should be locking down resources in advance. Even a > soft-realtime task like audio or video live decoding which cannot jitter > should be allocating both memory and any disk space required up-front > before the recording starts instead of relying on reserves. At best, > reserve access will only delay the problem by a very short interval. Or, at least, ensuring the system isn't memory limited. The biggest effect on RT task latency/jitter (on a normal kernel) is hardware interrupt and softint code 'stealing' the cpu. The main 'culprit' being ethernet receive. =20 Unfortunately if you are doing RTP audio (UDP data) you absolutely need the ethernet receive to run. When the softint code decides to drop back to a normal priority kernel worker thread packets get lost. (I've been running 10000 RTP streams - with 10k receive UDP sockets.) So I doubt avoiding sleeps in kmalloc() is going to make a significant difference. =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)