Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1396731pxj; Fri, 21 May 2021 13:13:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhp3b/vf/l9RkVk79PetSI2MwIjRPV3pjk6IK0wQBSz3w+EPrYkba4Uh1D3BL03VGUwxCQ X-Received: by 2002:a02:b68c:: with SMTP id i12mr6756332jam.133.1621628009681; Fri, 21 May 2021 13:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628009; cv=none; d=google.com; s=arc-20160816; b=xXoI/q12jafYta50WeQ4ub1Qw0fBTcc7QDo6yHSKTQUAK6eG3eBDhY66kHCYtHzdt3 JCYPAy4nB/nSpH2TfFkhxB7r+VzAeqYkpBvuM+A/lumE+c9oQ2dZT3g03dhw0nOxZyLo yYDF5Oru7/E0FNZ+A+nk1TPhwshmL3ygg7cX7xXN74EmHx9C7WoQSn44DDCizzlu+AdO idFhkBgRTIo6ewhqOvOXCtxXmvX0N/6trG0s/twfizQ3Pb+yLCPVxeq5FBDfEL/1Os7+ 0U8u0KRxySO49EhEMiRQFaI+YnOI6xdRzrroEKHmJAj6iNf71LtW5YOOhTwVfKJHJ372 vv8g== 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=rcSTsemfwC3FsCsW73LgpcWUvF5uH3i4WhVIGB2yDXQ=; b=xO0Eks4tg93eZLL+hiql5IDVCCixMY2hxorDDOwu7jIfwMTsEhMDrRtp5MHLg+OcLe inULaKFX+NKMURR5gP3d/7OAYbpRKK5uxW5hmEc+Gq9GCZa7Hf6BsznI/mvgVcho0Jod vWdEFG4aATvkdBwMS2EMuhRhckVn8hZ/HQ4sYwU66tVYtryjoxhNnMmiJ9O6KmswVRQB RCnVz8tVW2kf347JhoHqkJIgvm9uOqKmFrXk2XUe02RSNCD/91S6IwUMOXHtpw5k1PIu orqbZMuSXG1SccPDabOA9Wzu7De9Aw2FQnfNcnxuZ1PqBzdFImfVcOV93Fmr+APip7w5 8fkw== 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 h6si4699861jaj.29.2021.05.21.13.13.17; Fri, 21 May 2021 13:13:29 -0700 (PDT) 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 S232690AbhEUKRK convert rfc822-to-8bit (ORCPT + 99 others); Fri, 21 May 2021 06:17:10 -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)