Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2360578ioo; Sat, 28 May 2022 11:14:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLxxa2yOZsLTh1jwuUbya8Z0xTecouy1hWHusNQEGBLOqmLbTrDIkzcYmcCAO0x9FbVvRK X-Received: by 2002:a17:90a:e543:b0:1e0:8961:302d with SMTP id ei3-20020a17090ae54300b001e08961302dmr14702495pjb.129.1653761676071; Sat, 28 May 2022 11:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653761676; cv=none; d=google.com; s=arc-20160816; b=ksr2v5t5WVHt534jw2EjWsvrX6Jz5WHYfhlas/aMjBdQghrDZsUws8IaMhAuh6nvrp WGpRRKsUFW7AFbaRJtheEpEUZnm+TDX02XUvJUDWrvRpvxdoimqLz0F3EJ/DzGqmfQab hlcQMYtABJtMTYrbl84PY8da1qC2aS8Nn7xDSH0LHlhdRPazfR1GcYIktHSB2POpmvBI CnuDA81CqCJIWiV1NniNDiEY07o6AcLHdAKEjaXRTOxHwvtDH75Nwld6Lgk14v4NFySC hm5XPlznjrl0NEEQi8rSvnOij64Q17dRMWeriqFRkuX8sOB7++qEuZUPHAcanL8/0tAh TvLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vLmbrEy2PP3nbLOHrSgdn0TnCKQbA8uYZ/+AtNakFSw=; b=kfVFm6qPFVrhmseGNHtr7415NoxNPNFpBy8yIPljFEDzzqlSsBhp39J8dlxy/QmfcR oiJhwROwiiYHsAD73MH2AWP1FX6iFnb9XcM1IUrlmNs90dbM3mMwL6kQe+D1l1u2Hxri z0lHA/nZ5MiTOIwJESLfLziFcKW8usUaScObrPF3Thx6HMAA3k+2D5HUmmzJTBbF/bk1 dKOyBfA/Z8Z3j9tOhk217+/N8CjTCpgOufwPPHpSOjEB4rCuSb1svyvqS8DDbi+qIeSI YjvWEH0nV3rLuac7X3XVVMumWTptSLHJWQNBTcaRs8uA7xtxvnL6OOqP0l0UzckRi2ah Z9Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=L4Ji3fii; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v22-20020a636116000000b003fbd90bba10si2928790pgb.590.2022.05.28.11.14.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 11:14:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=L4Ji3fii; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4207213E82; Sat, 28 May 2022 11:14:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347660AbiEZRNx (ORCPT + 99 others); Thu, 26 May 2022 13:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238640AbiEZRNv (ORCPT ); Thu, 26 May 2022 13:13:51 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 646B32DA91 for ; Thu, 26 May 2022 10:13:50 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id u20so2577734edd.6 for ; Thu, 26 May 2022 10:13:50 -0700 (PDT) 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=vLmbrEy2PP3nbLOHrSgdn0TnCKQbA8uYZ/+AtNakFSw=; b=L4Ji3fiiRpXSJ3drcql+TyLsjhC+AM5jODVRmSW3i02WypkVR1aGjK7NuumtP34pu2 UoHHRfaIxqiXnG3fF6Bm9rj8m0/Fsd/ptrDGVm+epy/qVjKoA/FttwIisrI8AK1Lt5ot uquKG1Hq+RQf64wxHXIb3OkWZYNRXE7vhtTJo= 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=vLmbrEy2PP3nbLOHrSgdn0TnCKQbA8uYZ/+AtNakFSw=; b=qap82FY637QxUU7P0e0JNJP4c7aAw69DYc133vwaGApOhQYmCS9U1WeLhPERqV+xxp aXy6bEKUFZqQYIGTDCpOCLpnwHX2eAed4RcK0bsw2Z8l/eFLv+ibjjwy+qFGiKnN1SwP 2lYzS8ib9YHoRZEewuGD0Ru1XHK7udXGd5Hdu5i3VnBWcNnc0YwoYU+0Zw/4apKGSYdD wj0ehVGMIfSLwYhzH4cZz6kD1uMvAET7GlE1dZxcKxR+eHjYsFeGi0wwriBiT6bnvgqX D/IRkJhU+r9QnCPEuMNKPquO38fradruNC7+DmfGMJdoOBTK/3X05E+lLtoGzUX64/IL huAQ== X-Gm-Message-State: AOAM531mqoysz+nmXy3mquP1Nm82McgqgrzBPPprTAAmVJJtU7c9hlEe zKIBv/IezaMq5aWHvn7WflDlYseBnyejuYgnGVs= X-Received: by 2002:a05:6402:354a:b0:42b:52ed:dde4 with SMTP id f10-20020a056402354a00b0042b52eddde4mr26445786edd.324.1653585228735; Thu, 26 May 2022 10:13:48 -0700 (PDT) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com. [209.85.221.47]) by smtp.gmail.com with ESMTPSA id k25-20020a508ad9000000b0042bcc931c84sm981063edk.56.2022.05.26.10.13.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 May 2022 10:13:47 -0700 (PDT) Received: by mail-wr1-f47.google.com with SMTP id x12so2941386wrg.2 for ; Thu, 26 May 2022 10:13:46 -0700 (PDT) X-Received: by 2002:a5d:58c2:0:b0:210:1f7:bfa0 with SMTP id o2-20020a5d58c2000000b0021001f7bfa0mr6519550wrf.281.1653585225756; Thu, 26 May 2022 10:13:45 -0700 (PDT) MIME-Version: 1.0 References: <87pmk1tgmx.fsf@jogness.linutronix.de> In-Reply-To: From: Linus Torvalds Date: Thu, 26 May 2022 10:13:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] printk for 5.19 To: Petr Mladek Cc: John Ogness , Sergey Senozhatsky , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Jan Kara , Peter Zijlstra , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 26, 2022 at 5:09 AM Petr Mladek wrote: > > Yeah, it is a shame. I have met code with exclusive waiters only once, > 8 years ago and completely forgot about it. Yeah, the exclusive waiters thing is quite unusual, and not a normal pattern. It's basically only used for a very few performance-critical cases where the "multiple readers, but only one writer should wake things up" can happen. And it's rare. It's things like "accept()" on a socket - where it's common to have a lot of threads waiting for a new connection, but you don't want to wake them all just because one new connection comes in, because only one of them will successfully take it. There are not very many patterns like that where you have that "many people waiting for the same thing, only one will get it". It happens for socket readers (kind of like accept, but for the "UDP packet with command comes in"), or with things like pipes (which people use for similar things and distribute work to potentially lots of threads through a pipe). So the common pattern tends to be "some event that gets a threaded server using one thread to complete", but there just aren't that many of those cases. It _could_ also be used for things like locking (ie think "lock release wakes up waiter"), but I think all our lock primitives end up doing their wakeup routines at a lower level (ie using "wake_up_process()" directly) so those don't actually use it. End result: the exclusive waiters are an important case, but they are rare - and thus the "all()" version of wakeup is also quite rare. Linus