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=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 51059C433B4 for ; Fri, 21 May 2021 11:17:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CC91860249 for ; Fri, 21 May 2021 11:17:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC91860249 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 66D928E0033; Fri, 21 May 2021 07:17:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F6698E0022; Fri, 21 May 2021 07:17:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4495E8E0033; Fri, 21 May 2021 07:17:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id 0E69E8E0022 for ; Fri, 21 May 2021 07:17:58 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A7382181AF5C2 for ; Fri, 21 May 2021 11:17:57 +0000 (UTC) X-FDA: 78164988594.25.22861B0 Received: from mail-oo1-f42.google.com (mail-oo1-f42.google.com [209.85.161.42]) by imf10.hostedemail.com (Postfix) with ESMTP id E013340B8CF7 for ; Fri, 21 May 2021 11:17:54 +0000 (UTC) Received: by mail-oo1-f42.google.com with SMTP id j26-20020a4adf5a0000b029020eac899f76so2707986oou.7 for ; Fri, 21 May 2021 04:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EcIp8WA1WHrJEqMIlaVs2ij19F6h1FeNiLm8T3GjEDY=; b=gFmVEQZvD+AQHMdUJsoBv5RTf3kX2ozOsQ823fwsAf3l6XUyw97ke6ACIhTPJKpBgh wW9mdj6xBW9Aezn1Mzr+2ehoSfa27rNt5CGgwMz29mEoI4kptCCYhxnwOhTAdw5MlKZJ hl/Vvobs56pvLesJ9xjlrYHVK4njrrcGWDkBP0o7mryY2zfOzCab22xSH2X6p5SCDH1d 2uUQ0lUt0PltMWGXkqOQwRUDnHdY7aX2wWwJOuaO6XWNCU3PFTAiZfDRAoYV8FjRhHU5 hpWGlwDegjoE4JaCzJY5K7RBY3lu7LGkASVYncb5IR2I1J+V9qAxv1CpRW2SrrKd7Aqo g+1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EcIp8WA1WHrJEqMIlaVs2ij19F6h1FeNiLm8T3GjEDY=; b=qxEJmkq2oUqID/9lpnjiTzHpmMNjGy+akHrXZi1zuYMctIPlUT9GLdylDW+VXV63hp Zk7+x8QVpzfZALRNOPS5jwf4f0cq6TqfFADn+AJN7oLn84gRhWgSBd8WZYUi5n0DyWsS TdOKeLgrUx1bpg6Frre209oY8E1+gH8hJQtwWuWQEbeopVe1n+dmayJZ88wm5L49QZqn blC4C2y1+n9JiMjKJot1pNd1hLPX9aJw/6N5LWUFbsVCyUlE9DZJsXc9XEcs8hW9i/VH EIjWjuEcacxdTbffoinPCICk87V+oPS+8LX/zJZbOukQvj+Xr5r4QkCJwxCYhBSY+vVK ICOg== X-Gm-Message-State: AOAM533Vps5fNTkUA1KIvTAmg6DSgj02CL7chX+BT7UeqXT5RrJuM8WS JdsHq0kuzNoKS0mYuleyMsHpjLX253E5OzLi2LbyOw== X-Google-Smtp-Source: ABdhPJw8SJYXkQFKjdyvexxkcKn4vgnDN+xTtCy93UoM3eGHgFr6VjCvHqXfF8ZFZBoC62/obPHq3PSJt/HRt1kic/Q= X-Received: by 2002:a4a:cf15:: with SMTP id l21mr6404487oos.36.1621595876593; Fri, 21 May 2021 04:17:56 -0700 (PDT) MIME-Version: 1.0 References: <20210521083209.3740269-1-elver@google.com> <20210521093715.1813-1-hdanton@sina.com> In-Reply-To: <20210521093715.1813-1-hdanton@sina.com> From: Marco Elver Date: Fri, 21 May 2021 13:17:44 +0200 Message-ID: Subject: Re: [PATCH] kfence: use TASK_IDLE when awaiting allocation To: Hillf Danton Cc: Andrew Morton , Alexander Potapenko , Dmitry Vyukov , LKML , Linux Memory Management List , kasan-dev , Mel Gorman , stable Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: E013340B8CF7 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=gFmVEQZv; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf10.hostedemail.com: domain of elver@google.com designates 209.85.161.42 as permitted sender) smtp.mailfrom=elver@google.com X-Rspamd-Server: rspam03 X-Stat-Signature: yceiqmfumaoghauyrf71jae1rga1k1gd X-HE-Tag: 1621595874-832132 X-Bogosity: Ham, tests=bogofilter, spamicity=0.002708, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 21 May 2021 at 11:37, Hillf Danton wrote: > On Fri, 21 May 2021 10:32:09 +0200 Marco Elver wrote: > >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. > > Because of a blocking wq callback, kfence_timer should be queued on a > unbound workqueue in the first place. Feel free to add a followup to > replace system_power_efficient_wq with system_unbound_wq if it makes > sense to you that kfence behaves as correctly as expected independent of > CONFIG_WQ_POWER_EFFICIENT_DEFAULT given "system_power_efficient_wq is > identical to system_wq if 'wq_power_efficient' is disabled." Thanks for pointing it out -- I think this makes sense, let's just use the unbound wq unconditionally. Since it's independent of this patch, I've sent it separately: https://lkml.kernel.org/r/20210521111630.472579-1-elver@google.com