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 X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,PDS_BAD_THREAD_QP_64, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DDD6C433ED for ; Fri, 21 May 2021 10:15:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2765E613CE for ; Fri, 21 May 2021 10:15:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2765E613CE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ACULAB.COM Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 728826B0152; Fri, 21 May 2021 06:15:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6D8316B0153; Fri, 21 May 2021 06:15:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 552238E0022; Fri, 21 May 2021 06:15:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id 22CB46B0152 for ; Fri, 21 May 2021 06:15:47 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AE247181AEF31 for ; Fri, 21 May 2021 10:15:46 +0000 (UTC) X-FDA: 78164831892.37.489359F Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by imf04.hostedemail.com (Postfix) with ESMTP id ECA7A2D5 for ; Fri, 21 May 2021 10:15:44 +0000 (UTC) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-60-mPtdTae_O0O4mr9Plldzpg-1; Fri, 21 May 2021 11:15:43 +0100 X-MC-Unique: mPtdTae_O0O4mr9Plldzpg-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 21 May 2021 11:15:41 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.015; Fri, 21 May 2021 11:15:41 +0100 From: David Laight To: 'Marco Elver' CC: "akpm@linux-foundation.org" , "glider@google.com" , "dvyukov@google.com" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "kasan-dev@googlegroups.com" , Mel Gorman , "stable@vger.kernel.org" Subject: RE: [PATCH] kfence: use TASK_IDLE when awaiting allocation Thread-Topic: [PATCH] kfence: use TASK_IDLE when awaiting allocation Thread-Index: AQHXThvT1D7AluRty02nSL8F2LU+eKrtrQGA///ysoCAABhIIA== Date: Fri, 21 May 2021 10:15:41 +0000 Message-ID: <4a93b6d6c82049fc83004104f3e76fd7@AcuMS.aculab.com> References: <20210521083209.3740269-1-elver@google.com> In-Reply-To: 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 Authentication-Results: imf04.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=ACULAB.COM; spf=pass (imf04.hostedemail.com: domain of david.laight@aculab.com designates 185.58.85.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: ECA7A2D5 X-Stat-Signature: pu31o8trunoze4k4nbuss8tgwi3scjna X-HE-Tag: 1621592144-130166 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000335, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Marco Elver > Sent: 21 May 2021 10:48 >=20 > On Fri, May 21, 2021 at 09:39AM +0000, David Laight wrote: > > From: Marco Elver > > > Sent: 21 May 2021 09:32 > > > > > > Since wait_event() uses TASK_UNINTERRUPTIBLE by default, waiting for = an > > > allocation counts towards load. However, for KFENCE, this does not ma= ke > > > any sense, since there is no busy work we're awaiting. > > > > > > Instead, use TASK_IDLE via wait_event_idle() to not count towards loa= d. > > > > Doesn't that let the process be interruptible by a signal. > > Which is probably not desirable. > > > > There really ought to be a way of sleeping with TASK_UNINTERRUPTIBLE > > without changing the load-average. >=20 > That's what TASK_IDLE is: >=20 > =09include/linux/sched.h:#define TASK_IDLE (TASK_UNINTERR= UPTIBLE | TASK_NOLOAD) That's been added since I last tried to stop tasks updating the load-average :-) =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)