Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4847499rwb; Mon, 31 Jul 2023 13:16:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlF208mXv6+tJW4NXAH5MFmw9ljN6wMsl7yiKmh3fY/V1u/X/Nd4dE994Yg1aM0pGmw8qLYI X-Received: by 2002:a05:6830:10e:b0:6b9:1af3:3307 with SMTP id i14-20020a056830010e00b006b91af33307mr10319253otp.17.1690834618802; Mon, 31 Jul 2023 13:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690834618; cv=none; d=google.com; s=arc-20160816; b=khJHbKfJnY5zhUccDbD2WMNXRYTMXyHvENcy9SXo0HyxtsuCwB3bOX3XMCn16jbWjr Tc8snzwaUI5gGjigoguBKyCAJcro1ldgb5GbdXxf/2Bm8UqEfG8EB9d6saoiH2jTiGbV WLE7PXWbVWgrU0DiZUjO2hjP0WvS8tLYPgKlsFRGFeqp5CK2Rf04L2wyUoZP2Y3/nQ97 VkG2OOx6Aag8pIxlwlASOmJ5hMDAvMWtWEcISj3xEC3RYU6YoskDJ+J2X/6xl/aytdS7 NEdy1kJaFcQ6LsF4I7TTbS0HHh4lw2AsCAswCuomC7l+IJnoTBUhfOx+crjuyUhPbz3Y +SpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=v3KFf9AewUDstKJtKahowIoTFXcs3ACJtvJL1LnzLQE=; fh=JUH9WnxDjHhvdJijdk3wWmrQekEPTtI8r359jAZ3eJQ=; b=a1eIiTaLsyN0fiRsoVUVgQz8gbbnzGmxa+Ps6kdBRqf1XcLV916/H7+s754Ou25Avj VXXPSdQgdHDUo26BiO5HGNYdPEXM5DmEO1zpRz/BD24jT4LT3nryR5Zrez0WrWeFx6mJ 2ONe9sZ1qZE1SeDJ/OgsNKad2w1fctD1TEqihgfDkN9IoYHXSgYCwHdG2IUzllNa5az6 MXMj4ieOikc84R6400q26TccYu2iS7857w8QLZxvtOG0a+BcBYaIY6Q4Pz2F1Up6DuHC QWX+EfKiEa/HO/N9kdj0KCTBiqTI4FqSAbkEzLarShUwQkqI/u/5Gq/1TD4KN5gHb6rv QT1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=R4ECufch; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 137-20020a63018f000000b0054febdc8ea2si7565466pgb.87.2023.07.31.13.16.45; Mon, 31 Jul 2023 13:16:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=R4ECufch; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231329AbjGaTOh (ORCPT + 99 others); Mon, 31 Jul 2023 15:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjGaTOe (ORCPT ); Mon, 31 Jul 2023 15:14:34 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F300BE4B for ; Mon, 31 Jul 2023 12:14:33 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-267f870e6ffso2844913a91.0 for ; Mon, 31 Jul 2023 12:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690830873; x=1691435673; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=v3KFf9AewUDstKJtKahowIoTFXcs3ACJtvJL1LnzLQE=; b=R4ECufchNtK/yhPlyf4sGYL8V5B+uXGSidl3ahjnSvpiPX3iU4WZA65G2qcOiFdOdi YRaz9KEl5H9NNtFdiGr3Ym71um3II5QBozgntrAwGtIwXjt0sPVmj8GeXi9yz2YMmPIF 5jQqHKiuSN53YlnzoAqX7UIi8aRHw3rBgBcVaN0n/eSoRr3lJAKsDH/UK8z84zDVRhA/ 5ncgUbdzyeE3WZaReml9geU5ffHhAO9en6S1dDTA9t9iQXIrHuXdVRFcFRMT+7p+HJm0 0T3ettaqC5QYeOyW961TZ5cPJV/k8TKmiMlRx3wpuGzX34GlujJaCVCCJXkOA+oZjwUE Eg2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690830873; x=1691435673; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v3KFf9AewUDstKJtKahowIoTFXcs3ACJtvJL1LnzLQE=; b=GnHK+8ZB9kGtPCUKKPBOzV013rpnmlHZQNLd3Cx1clv16x8DspvIfoWWo/SAHoutNH J9ddZ0niBy2gol+DGoEk7a5pLeDMrv46fGADzICJ9YsQF6eA0eSI/q2OnCd+U5yRcuNx LdmXviKhr4ytvn1rWcNxiVBjlSz4pKurjYWwluXRi/KAWS+VOoOyteZQdM2OUGB5ZLd3 89a5czk+tDeUvsv3v/t4IMmIkzQKkYmVB1REURMDho5fqvywpP4ZRycaH8AV0FsXLZ4S CrYaP7GQfKaFDLdVSb8yWI72S4XRy2tfXyKptq6EZpiPIH1Ex0Dt8Azw1RnYycG8DWEk 74/Q== X-Gm-Message-State: ABy/qLY909T/GwBP5IDH+q1x09GBxJmOATpee52j/BnYL9IuBFRWbuZM 6CzgQY8hU3TY7vdc0slYA2TrrYzHhKk= X-Received: by 2002:a17:90a:3e4e:b0:268:29cb:f93a with SMTP id t14-20020a17090a3e4e00b0026829cbf93amr10384986pjm.1.1690830873110; Mon, 31 Jul 2023 12:14:33 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:4a3a]) by smtp.gmail.com with ESMTPSA id m8-20020a170902bb8800b001b8a3dd5a4asm8909383pls.283.2023.07.31.12.14.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 12:14:32 -0700 (PDT) Sender: Tejun Heo Date: Mon, 31 Jul 2023 09:14:31 -1000 From: Tejun Heo To: Linus Torvalds Cc: Petr Mladek , Dave Airlie , Arnd Bergmann , LKML Subject: Re: arm32 build warnings in workqueue.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,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 Hello, On Mon, Jul 31, 2023 at 11:40:04AM -0700, Linus Torvalds wrote: > So I think the whole "gdb debug info" argument is complete garbage, > and was never true at all. If you want gdb to know about these > constants, you just do the same thing that gdb users already have to > do for other things. When manually debugging with gdb, figuring out these constants might not add too much overhead on top but nowadays there are many other tools which can benefit from having the source of truth available to them directly from the kernel. For example, it's a lot easier to write non-trivial debug scripts with drgn (https://github.com/osandov/drgn) and it's not too unusual to have a collection of bcc / bpftrace scripts for diagnosing common problems. They of course don't have any interface stability expectations. However, there's no reason to make using them unnecessarily painful given how useful they are. Having constant values included in the kernel debug info makes it a lot easier to use these tools and removes a silly source of subtle problems. > And honestly, I don't understand why anybody seriously believes that > those WORK_STRUCT constants are somehow very important. We have many > *much* more fundamental constants that are #define's. Thinking that > WORK_OFFQ_CANCELING needs special gdb understanding when we have > PAGE_SIZE that does not seems entirely crazy to me. PAGE_SIZE is easily available through _SC_PAGE_SIZE, so that particular one is never a real problem (and a lot of tools have pre-defined helpers for it and similarly important constants) but yeah there are other constants which I sometimes wish were available through debug info. It may be difficult to argue specifically for WORK_OFFQ_CANCELING in isolation as it is directly derived from __WORK_OFFQ_CANCELNG, so no problem there, but I hope you can see that having these constants available in debug info in general is useful. Even here, the value of __WORK_OFFQ_CANCELING is dependent on CONFIG_DEBUG_OBJECTS_WORK. It's not a strong case as the option is pretty specifically for debugging but if one is to actually debug or monitor workqueue using external visibility tools, this can easily lead to mistakes. Thanks. -- tejun