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 867CDC433F5 for ; Mon, 10 Jan 2022 18:19:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B12F86B0072; Mon, 10 Jan 2022 13:19:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AC5EC6B0073; Mon, 10 Jan 2022 13:19:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B1116B0074; Mon, 10 Jan 2022 13:19:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0115.hostedemail.com [216.40.44.115]) by kanga.kvack.org (Postfix) with ESMTP id 8B10D6B0072 for ; Mon, 10 Jan 2022 13:19:14 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 3F4171816C8DD for ; Mon, 10 Jan 2022 18:19:14 +0000 (UTC) X-FDA: 79015189428.22.6D2A149 Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) by imf12.hostedemail.com (Postfix) with ESMTP id C569A40008 for ; Mon, 10 Jan 2022 18:19:13 +0000 (UTC) Received: by mail-yb1-f172.google.com with SMTP id i3so40292090ybh.11 for ; Mon, 10 Jan 2022 10:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ozjIGPdXpEGjhtrg7M9VDsi92b2yheJb0XVg1R0oCbg=; b=fGaKbNq7gW4Ltg3I9MP05btVJ6khCEq4ydjLMoCyQ1T6LAiTW5HyVlirDB1nTJxqkK CfkP3LlUCKOcCJQsUkVvhmBsfmyVbp4aJ55ti58tzyWVAL34R3Y4vsHdBy0Hj44hEZmR f+V8kKf3bl1hHVTV8s8K+oNZty1euOaZobUa2bBroTP6JD8r0rU0MET/MnOifuNMjHr6 Q/umUsqZv3b320YCrj8og3k7n850WCE89aIEFeFXrM1czElniv0Go3sDUAkq7DCy+g2f PkclGpD3DAXUcEHqa0NGndTEbmlZ3RpjJ1cCT7K4mz9CKrDe5Swpz0FNjY+0mFDK8YjN flGw== 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=ozjIGPdXpEGjhtrg7M9VDsi92b2yheJb0XVg1R0oCbg=; b=flfSTvChV1o7LJpgOpzbbzT9HTWTnngxx0pqAoQ40osO+EvMAK3aT3Hy25GKiUVqnB JpDA4l+MMuObYkh/7cpO4CaF3yp3XmSrxAThB6nGr4jlgnTAAbdx5HNXM82wJlfRh7ws hZZn/6n4lkcUheih5DvbRxOhpcI3O+E0IByouKSUEE2dNy7rA3SYgrn3iTq6I6ub4BgK R7c3+GUcxnlSfzwNx8Ix1MpY+rWMvYt51s19/vfMEid7gFyfbJ3oNh1dpaTA/GUeFmsb 7I2XhjBY+ecozOGmD76n7ylS70NCMf5Y0aBT46uWrKPUIDzRqK1avfgT8SfQJ4t9oQmL xR6A== X-Gm-Message-State: AOAM531HlCuRh8H3EL/VykpD4Q8L1tgGQ+VSopnd1yWvD5bFsnMsCjFw J8/CEWJQCuaZUPONZW9ReVNSCqqYcsD8qY66MjIQbQ== X-Google-Smtp-Source: ABdhPJw5558XhgRjCcRfT/CqFjcX6F4tW6g3+lEt8isEvNJmqNNK9qXJpBoekCCbDpCmlDJ7K9OUxCe3STiF/6nmwSo= X-Received: by 2002:a05:6902:703:: with SMTP id k3mr1066936ybt.225.1641838752718; Mon, 10 Jan 2022 10:19:12 -0800 (PST) MIME-Version: 1.0 References: <000000000000e8f8f505d0e479a5@google.com> <20211211015620.1793-1-hdanton@sina.com> In-Reply-To: From: Suren Baghdasaryan Date: Mon, 10 Jan 2022 10:19:01 -0800 Message-ID: Subject: Re: psi_trigger_poll() is completely broken To: Linus Torvalds 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: poc1dc7zn6nja7fpdc9y5ommm1on3kzw X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: C569A40008 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=fGaKbNq7; spf=pass (imf12.hostedemail.com: domain of surenb@google.com designates 209.85.219.172 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1641838753-540298 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:42 AM Linus Torvalds wrote: > > 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? Yes, definitely. I'm on it. Will try posting it later today or tomorrow morning if testing reveals something unexpected. Thanks! > > Linus