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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 D1192C43460 for ; Fri, 21 May 2021 10:15:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4DB8613CB for ; Fri, 21 May 2021 10:15:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234190AbhEUKRM convert rfc822-to-8bit (ORCPT ); Fri, 21 May 2021 06:17:12 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.85.151]:35484 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233040AbhEUKRI (ORCPT ); Fri, 21 May 2021 06:17:08 -0400 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 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: Marco Elver > Sent: 21 May 2021 10:48 > > 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 make > > > any sense, since there is no busy work we're awaiting. > > > > > > Instead, use TASK_IDLE via wait_event_idle() to not count towards load. > > > > 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. > > That's what TASK_IDLE is: > > include/linux/sched.h:#define TASK_IDLE (TASK_UNINTERRUPTIBLE | TASK_NOLOAD) That's been added since I last tried to stop tasks updating the load-average :-) David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)