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 EFAD4C433EF for ; Mon, 10 Jan 2022 17:42:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4D4156B0072; Mon, 10 Jan 2022 12:42:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 482716B0073; Mon, 10 Jan 2022 12:42:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3237F6B0074; Mon, 10 Jan 2022 12:42:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0005.hostedemail.com [216.40.44.5]) by kanga.kvack.org (Postfix) with ESMTP id 2087F6B0072 for ; Mon, 10 Jan 2022 12:42:34 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CEE48824C421 for ; Mon, 10 Jan 2022 17:42:33 +0000 (UTC) X-FDA: 79015096986.11.7F3B302 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by imf24.hostedemail.com (Postfix) with ESMTP id 680EC180007 for ; Mon, 10 Jan 2022 17:42:33 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id k15so56487923edk.13 for ; Mon, 10 Jan 2022 09:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ivp04c2e3aswpbUBl40rsDf5F/qMDtdT9+Y9jMZOA1Q=; b=TTdgKky08/wWY8IHzQ4R8Iu6WyCMszal1xCNQXMIJQFj7tisdchulnP4SWln7HChj3 erP0vKpWvoXP6NoMkeWf1ihDRZubjTL6cpa8AQ3I6XIbuWr0Yi5+G3ZkfRNwD7MSWx5E EVNav+oSusoTbkI8xMHCIK7H2IjGRrU1kjjyI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ivp04c2e3aswpbUBl40rsDf5F/qMDtdT9+Y9jMZOA1Q=; b=Ckqzs2qGnKywewpbSHXGvokkYM64oiXChMeOr3I7sByWspXO7s4xe1hb5wIVuanytV 6c4RXU2s3KT2vshMLeYuJhDo25gbFBMztBAlHxI7Dk5OGX3nl4fPRiGtVVNStUreoFT6 aGeuFB9wpx+AoHp/qce4EVub70iVI8VT+fWSa/CsujRgQSeCmYErHgFEqNqgpVBPUfN6 BDMQBWWjfd0aZC+1i3RmZs0B8cJB6ZR62Ad5WJ1Qnk3w48nwGq+tMTpWTYW1rMycmzPR Qxvav164OpPyQweAbQGXcvACP6QCT1aHdxFCMwQebGy3AFCjvf5vynGxpvgofTKM7sZU 2D3Q== X-Gm-Message-State: AOAM5330bzNB63pjm8OumhDTaBQRbL+pbd4SVWpgh0s/7GdSGKL8K1Z2 wKtPZA32p4w7IGCh+Pdij6UAC8ZNDr6wixi3gBo= X-Google-Smtp-Source: ABdhPJyYo5rQaCbW79oBpVqWDN0VLUA1dit3xlv4kUbU/k77EI2g8WTaYMJnZpGeS6h9FlRh7FXt3Q== X-Received: by 2002:a17:906:17c6:: with SMTP id u6mr621486eje.263.1641836552061; Mon, 10 Jan 2022 09:42:32 -0800 (PST) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com. [209.85.221.49]) by smtp.gmail.com with ESMTPSA id 16sm2696816ejx.149.2022.01.10.09.42.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Jan 2022 09:42:30 -0800 (PST) Received: by mail-wr1-f49.google.com with SMTP id r10so20571290wrc.3 for ; Mon, 10 Jan 2022 09:42:29 -0800 (PST) X-Received: by 2002:adf:c74e:: with SMTP id b14mr579287wrh.97.1641836549717; Mon, 10 Jan 2022 09:42:29 -0800 (PST) MIME-Version: 1.0 References: <000000000000e8f8f505d0e479a5@google.com> <20211211015620.1793-1-hdanton@sina.com> In-Reply-To: From: Linus Torvalds Date: Mon, 10 Jan 2022 09:42:13 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: psi_trigger_poll() is completely broken To: Suren Baghdasaryan Cc: Johannes Weiner , Eric Biggers , Tejun Heo , Zefan Li , Peter Zijlstra , Juri Lelli , Vincent Guittot , Ingo Molnar , Hillf Danton , syzbot , linux-fsdevel , Linux Kernel Mailing List , syzkaller-bugs , Linux-MM Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: ungqekh7uyp8szp3hk13943hkezrcbdp X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 680EC180007 Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=TTdgKky0; spf=pass (imf24.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.208.54 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-HE-Tag: 1641836553-562223 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: On Mon, Jan 10, 2022 at 9:25 AM Suren Baghdasaryan wrote: > > About the issue of serializing concurrent writes for > cgroup_pressure_write() similar to how psi_write() does. Doesn't > of->mutex inside kernfs_fop_write_iter() serialize the writes to the > same file? Ahh, yes, it looks like that does solve the serialization issue. Sorry, I missed that because I'm not actually all that familiar with the kernfs 'of' code. So the only issue is the trigger lifetime one, and if a single trigger is sufficient and returning -EBUSY for trying to replace an existing one is good, then I think that's the proper fix. I'm very busy with the merge window (and some upcoming travel and family events), so I'm hoping somebody will write and test such a patch. Please? Linus