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 B0146C35274 for ; Tue, 19 Dec 2023 03:39:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4571C8D0006; Mon, 18 Dec 2023 22:39:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 406498D0001; Mon, 18 Dec 2023 22:39:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2CD7C8D0006; Mon, 18 Dec 2023 22:39:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1AFE08D0001 for ; Mon, 18 Dec 2023 22:39:49 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E83061C0D8F for ; Tue, 19 Dec 2023 03:39:48 +0000 (UTC) X-FDA: 81582163656.10.C07655A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf05.hostedemail.com (Postfix) with ESMTP id 40777100010 for ; Tue, 19 Dec 2023 03:39:47 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=ITdKYqwV; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf05.hostedemail.com: domain of longman@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=longman@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702957187; h=from:from:sender: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:dkim-signature; bh=zZw4ofGAlppuglt6x8Rmjoh3YeiKF8NbZWLa9SMnlhM=; b=ZHqcpYhGLsLQ9kt7+V84PkIWjnXFxGzhD34dZXfKVAAG7RoryXI61QmVdXavZ/y9pfBPq7 rF+Ft0P84YjzILOK1vuCpiop3U2jPWcRuVGvaiEWlgHoujGxreKdESKSc+pos91MYf9bqD yWEEff9YLxbJSHssIX05Mz7NgRVMesg= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=ITdKYqwV; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf05.hostedemail.com: domain of longman@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=longman@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702957187; a=rsa-sha256; cv=none; b=Rs/lZ8ubaVKr88z1ryV7A5huqFHF928P1APy0ZuWRgAOyPyU/eHCWApJvWQddf8QoL4Rfb dMooHRvGEKpqPpJCfH8M5r2RpKz5JdAkjODHes6c6k2ZtMgC7iuxSMnp8g+IXcouRv4dzi WbQK2zDO49Pgtsvy5yrZySRbTUqLBpM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702957186; 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=zZw4ofGAlppuglt6x8Rmjoh3YeiKF8NbZWLa9SMnlhM=; b=ITdKYqwVNhNllefRsY7YMtXya3yjGpFCQpPMilgtqyjKnX+FcqTMMLVm8i9f3ascHJREyz +zoWv8hTiIm75atsZMoWpAN6NZq94mAhJ9BKjUQAzByIs6xEbI6/KINraQL6S8IQLfyZF4 U5zTUaC4S1+jvkrIZWqjxBWEsyrGd9Y= 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-253-yRbxa32xMtyHn4H3whgBzQ-1; Mon, 18 Dec 2023 22:39:41 -0500 X-MC-Unique: yRbxa32xMtyHn4H3whgBzQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 1E0AC8030BF; Tue, 19 Dec 2023 03:39:41 +0000 (UTC) Received: from [10.22.32.252] (unknown [10.22.32.252]) by smtp.corp.redhat.com (Postfix) with ESMTP id 56A0B2026D66; Tue, 19 Dec 2023 03:39:40 +0000 (UTC) Message-ID: <7bb01e17-90c9-4f2c-af62-5b1d68c7064e@redhat.com> Date: Mon, 18 Dec 2023 22:39:40 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 19/50] locking/mutex: split out mutex_types.h Content-Language: en-US To: Kent Overstreet Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, tglx@linutronix.de, x86@kernel.org, tj@kernel.org, peterz@infradead.org, mathieu.desnoyers@efficios.com, paulmck@kernel.org, keescook@chromium.org, dave.hansen@linux.intel.com, mingo@redhat.com, will@kernel.org, boqun.feng@gmail.com, brauner@kernel.org References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-1-kent.overstreet@linux.dev> <20231216032651.3553101-9-kent.overstreet@linux.dev> <7066c278-28e0-45eb-a046-eb684c4a659c@redhat.com> <20231219014617.dulwl3mdro6zyblt@moria.home.lan> <647f6ed8-c6d8-421e-b5a7-faa3c19b9bd6@redhat.com> <20231219033700.rsc7utoz3vkayyno@moria.home.lan> From: Waiman Long In-Reply-To: <20231219033700.rsc7utoz3vkayyno@moria.home.lan> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Rspamd-Queue-Id: 40777100010 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: ioqa7ku34t33wd4z5iuqp4ra94theb7r X-HE-Tag: 1702957187-369305 X-HE-Meta: U2FsdGVkX18JuSQZJbN0ftnuLmaY6s7KRPoPv/nuwA1aOJuNhIDJxmfs+Ka14GqsJWVBOlLeq+YAATqoWcpB0DHpVud8SB4tFyE/yC/XNufzAFWKXoWN2vb52+puih4qNKEMjyANlSCh7WnQmDx4ilWuLwDdDja7zLeVXs9k6ze8sj6GOBwqAQNKflUxK0hUEfpEAMnEIbBynPSYLsFr7eE3/Aolaw7SuI4OH3AHJpxsq1AxEr0veKSclZchIXfX37ugTB2N7dGuinx6cvx9z66Mfyere9MXIGXDchg7x/i+EaHIbBsVXgZ3IwH4NAEhoOvkfJ7z5ZFTpRlc5r04t7QsA5Xd0La7Rc9QkY7jxKSFPt0Ysln/sY+zLSWs2U6IB0H67M9SLWdwPczbUpCN0F1dBz+z7DJZ+Vc1TPe4EC1toBt94hnLW4jGWS/P1yFxwsJu2oQqS8nKQY9AkGCicyTmTJotux9Fe9O28ll8jQ/VDqFCngj2uKlFQd8+nxYOA2/56EGBLWaQe3lgqqqio/TsxlaST4Qg9LmXQSqv09+j9E0Ivq5TUNiTCLQcpNzGyv5sMIe4RyE9eoMO1Fr1x7m75kHoUiDmCJa64JZ4Z5Brl90FHUgDULrVFCaNygqfkQFhXCmwSm6BktWMmqcPx95j16XJ+zV9v/ZhOnyGsGdZeJSRCNrS6547sNeSIsTZO9ML8zuXZ+j6zsgRK7QHlsHY/7B6T5j1EeBZZtuHUK6ADxoMhN5SXsUpfhO/z9wMGwf6eqq8ikqtwTZbg9LTOz4UiAvQnnjZwXvcVt/d/LwsWE4JcNO6B1Q+HlocA+2ftqkQPbKVl3Djq5m6IvgoWjrDCilIzhHEKfQ8cvwqY81Q5NpQ7jCFXhM4WMgBstW1V/nC/rgbcfcAo5PPIe2/tNq491maqoGdc1OViuNp9l7TcfHGoEf1W3nSYIv/hn/vGik2+zLa3ITG9VELy/p ZilOmEvb Na3McpseAjItsyXxEn0OmtApuXz2ngog7NTKsD1mMeEcVQbQ= 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: List-Subscribe: List-Unsubscribe: On 12/18/23 22:37, Kent Overstreet wrote: > On Mon, Dec 18, 2023 at 10:04:39PM -0500, Waiman Long wrote: >> On 12/18/23 20:46, Kent Overstreet wrote: >>> On Mon, Dec 18, 2023 at 11:53:08AM -0500, Waiman Long wrote: >>>> On 12/15/23 22:26, Kent Overstreet wrote: >>>>> -#include >>>> Including rtmutex.h here means that mutex_types.h is no longer a simple >>>> header for types only. So unless you also break out a rtmutex_types.h, it is >>>> inconsistent. >>> good observation, I'll have to leave it for the next round of cleanups >>> though since the merge window is approaching and I'll have to redo all >>> the testing. >>> >>>> Besides, the kernel/sched code does use mutex_lock/unlock calls quite >>>> frequently. With this patch, mutex.h will not be directly included. I >>>> suspect that it is indirectly included via other header files. This may be >>>> an issue with some configurations. >>> I've now put it through randconfig testing on every arch that debian >>> includes a compiler for (excluding sh and xtensa, which throw internal >>> compiler errors) and that one hasn't come up yet. >>> >>> could still be included indirectly though - I haven't checked for that >>> one specifically yet. >> If you are replacing mutex.h in include/linux/sched.h by mutex_types.h, I >> would suggest you add mutex.h to kernel/sched/sched.h to ensure this header >> file is included by the scheduler code. > It already does, via mutex_api.h... You are right. I am not aware that there is a mutex_api.h header file which is just an alias of mutex.h. Cheers, Longman