Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1420055rdb; Wed, 6 Dec 2023 20:18:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEbQY3J7U1CMsy+0F0Q073D9oxCYgaq8Nsk0ZISGOTWkZZ3E6ga0AqTNyrmu+x3INrzWWX X-Received: by 2002:a05:6871:e70c:b0:1fb:75c:3fdf with SMTP id qa12-20020a056871e70c00b001fb075c3fdfmr2480489oac.63.1701922699371; Wed, 06 Dec 2023 20:18:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701922699; cv=none; d=google.com; s=arc-20160816; b=ZbOy3WEF0XhP8SKachKbm0VYbGT1OimXIWCP0VR+70dtQVHuLmJJ07lwxJSGGvgvdO N2QmmKtso2A7n0DJykAi9Gcy+TLvdkbi8diVcnaWqQst6V/9gL7YXnTfB39QKVtK5XLS z0gBVcuxuXl6qvShT/ME1PqYBPdLI6mlfsUFgEt0sdH88ESa6xAa2D3oy1EHYAocnZo/ gYUd21Bu08GPWMzk8ie5hHzXQLmai+620VLmC2unD1EtZA7KXe0ycMmHs0yDeQ/z388B DYxoOP5XUE4GqQ0B749GB2lxaSVDCxMPNNCGq81cLdmrHeoKU7kZEdylP0NOCafzO46R aIXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=BcdeWsLVE0ZLjCzsplESZkvtBaAPo5FuR7NkpRBEkQA=; fh=xgkuC8Ks0NMEEoufQ+4djHpwZ0KaxQyAXE5X3XSMeuw=; b=QuKhW6L6KuLak7S3EAtU6I63MrYoFhaqznwnjD6IN+fixTNuXKUbIksS/NI2yD7z2d 8L3Gojo9pETz5raAzIm4C60SHXbstx5vLu07kqJCuPF/GyQCK5z7Shf0nqOXwaFQsLk9 SMHfjqsyj8H3nwFsNDeplwBlR0D5ceyTKrDocXpL25qxkDenQmblOdUHpR74WRXtY7+Y qAgmC/z8BmzhyLx3N0Ha53FBE50qU3BhauUEdWIQj42/WINSSMm8MzobWq3BXoaKmPFk jeRYWef/177hcaKvR4Mhe3CzrLahsN0DI+oxoYvXbgIYqFzAPXTAZJoCAMyYIFXftY/+ pJaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="d7C/Inwb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t8-20020a656088000000b00589878c0a5bsi453555pgu.71.2023.12.06.20.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 20:18:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="d7C/Inwb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id D9B66801CFCF; Wed, 6 Dec 2023 20:18:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229640AbjLGESC (ORCPT + 99 others); Wed, 6 Dec 2023 23:18:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjLGESB (ORCPT ); Wed, 6 Dec 2023 23:18:01 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F222D5C for ; Wed, 6 Dec 2023 20:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701922686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BcdeWsLVE0ZLjCzsplESZkvtBaAPo5FuR7NkpRBEkQA=; b=d7C/InwbAT7IDH1/FSl6vaSm+aNM9Qm1qGkHQcouTzQrMI285QT4Qa08QBzx4U7G4OhNip WaixpCZhGGS4N8vilCfkzNRpFV8bOGJUZTgdR8f7flH6tuE1k0+A8YEzU347GfdbfE2JcN Xpc8xwNswNZqIUb2lCcqmNuXoA2rL3I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-94-9uXx9ycNPIuQy64WxMJy3g-1; Wed, 06 Dec 2023 23:18:04 -0500 X-MC-Unique: 9uXx9ycNPIuQy64WxMJy3g-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6688F83B86A; Thu, 7 Dec 2023 04:18:04 +0000 (UTC) Received: from [10.22.34.92] (unknown [10.22.34.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1885C492BC6; Thu, 7 Dec 2023 04:18:04 +0000 (UTC) Message-ID: Date: Wed, 6 Dec 2023 23:18:03 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: linux-next: build failure after merge of the cgroup tree Content-Language: en-US To: Stephen Rothwell , Tejun Heo Cc: Linux Kernel Mailing List , Linux Next Mailing List References: <20231207143806.114e0a74@canb.auug.org.au> From: Waiman Long In-Reply-To: <20231207143806.114e0a74@canb.auug.org.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 06 Dec 2023 20:18:17 -0800 (PST) On 12/6/23 22:38, Stephen Rothwell wrote: > Hi all, > > After merging the cgroup tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > In file included from : > kernel/cgroup/cgroup.c: In function 'cgroup_free_root': > include/linux/compiler_types.h:435:45: error: call to '__compiletime_assert_1792' declared with attribute error: BUILD_BUG_ON failed: !__is_kvfree_rcu_offset(offsetof(typeof(*(root)), rcu)) > 435 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > | ^ > include/linux/compiler_types.h:416:25: note: in definition of macro '__compiletime_assert' > 416 | prefix ## suffix(); \ > | ^~~~~~ > include/linux/compiler_types.h:435:9: note: in expansion of macro '_compiletime_assert' > 435 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > | ^~~~~~~~~~~~~~~~~~~ > include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' > 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > | ^~~~~~~~~~~~~~~~~~ > include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' > 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) > | ^~~~~~~~~~~~~~~~ > include/linux/rcupdate.h:985:17: note: in expansion of macro 'BUILD_BUG_ON' > 985 | BUILD_BUG_ON(!__is_kvfree_rcu_offset(offsetof(typeof(*(ptr)), rhf))); \ #define __is_kvfree_rcu_offset(offset) ((offset) < 4096) It looks like commit 77070eeb8821 ("cgroup: Avoid false cacheline sharing of read mostly rstat_cpu") has caused the offset of rcu to exceed the 4096 limit under such configuration. After I move the rcu field up, the compilation error was gone. So any change that makes the cgroup structure larger is likely to cause this problem again. The simple fix is just to move the rcu field up. I will send a patch to do that. Cheers, Longman > | ^~~~~~~~~~~~ > include/linux/rcupdate.h:957:29: note: in expansion of macro 'kvfree_rcu_arg_2' > 957 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf) > | ^~~~~~~~~~~~~~~~ > kernel/cgroup/cgroup.c:1318:9: note: in expansion of macro 'kfree_rcu' > 1318 | kfree_rcu(root, rcu); > | ^~~~~~~~~ > In function 'cgroup_free_root', > inlined from 'cgroup_destroy_root' at kernel/cgroup/cgroup.c:1363:2: > include/linux/compiler_types.h:435:45: error: call to '__compiletime_assert_1792' declared with attribute error: BUILD_BUG_ON failed: !__is_kvfree_rcu_offset(offsetof(typeof(*(root)), rcu)) > 435 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > | ^ > include/linux/compiler_types.h:416:25: note: in definition of macro '__compiletime_assert' > 416 | prefix ## suffix(); \ > | ^~~~~~ > include/linux/compiler_types.h:435:9: note: in expansion of macro '_compiletime_assert' > 435 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > | ^~~~~~~~~~~~~~~~~~~ > include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' > 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > | ^~~~~~~~~~~~~~~~~~ > include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' > 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) > | ^~~~~~~~~~~~~~~~ > include/linux/rcupdate.h:985:17: note: in expansion of macro 'BUILD_BUG_ON' > 985 | BUILD_BUG_ON(!__is_kvfree_rcu_offset(offsetof(typeof(*(ptr)), rhf))); \ > | ^~~~~~~~~~~~ > include/linux/rcupdate.h:957:29: note: in expansion of macro 'kvfree_rcu_arg_2' > 957 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf) > | ^~~~~~~~~~~~~~~~ > kernel/cgroup/cgroup.c:1318:9: note: in expansion of macro 'kfree_rcu' > 1318 | kfree_rcu(root, rcu); > | ^~~~~~~~~ > > Possibly caused by commit > > 77070eeb8821 ("cgroup: Avoid false cacheline sharing of read mostly rstat_cpu") > > I have used the cgroup tree from next-20231206 for today. > > >