Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1027450rdb; Fri, 20 Oct 2023 06:38:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjdXCwQlquPStoUjss2jzxivTLqwgmOEYhLRhddaeIbhgoNM+4AcJGPtzAJ/IYBttdne0f X-Received: by 2002:a05:6358:9226:b0:134:de8b:17f0 with SMTP id d38-20020a056358922600b00134de8b17f0mr1668106rwb.19.1697809120660; Fri, 20 Oct 2023 06:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697809120; cv=none; d=google.com; s=arc-20160816; b=IgELWWS6oVs3ckOvPz2filnct9sy6O8tSoMGj9AxA2Ud8tfNDwccO3BeP01woyjxMM WzPzWWjMVsgPGYYZogDE1uDVd3051XUkjN8mFEG2Rg6r3R2oF1gOBFfw80GnAJ3iDuT9 LoUzjKTz5GnkBBNZJR4tGqv+swstI2vZBZHdvysymYTHH1Bh2VUBSWkT10q9KDzr7Afh AeLqJf5TMXOZEhGfgHhwFTEFPe/rwZtJNsF/AoCQjbby6hL4vEp3ZrfCJDRYyEd0v1w9 zXgcYwbGm8Gl3Z/aLJYMl/77q+K1CQOtXpJOsg4xavG7TVkyCo+ZM9ScDCq9IkzcAHLz tewQ== 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=GXLDllsQlfgcB0N053/Ac6iwia8k1MwiyVxT73CFT+w=; fh=UqmYxAf1JIsva+/z3/L6mnzTA9vbWfU7LAgZM1yxXZM=; b=Bq0z+R92COWRzP8pFUKIrZG7goFKjiZVO2xwb1uGY+Qzz+MZ7O00MyCitB6dUbi7fX fkyGwgEY5SZX4q4Sw+OS6JK/MA1+fD9uxtRF2Crv4209KEmwUdqmuNcIRjeFnYxQao5T gINDQBMYku0PNWBRP4INN7IZEKE5hu7PQ+CzaZ8v4tGjO23uTCHzDVIbhpntqBf0bSPI ALX9VUGkrdpMXrU9ChQVAWuaVR+H+gc7KL9+vcjc7V5O6NiWQeVQFsBwAKRXJIh2Kpg+ 65vFr+ptVwsJoMff4bXlJ6+ypNBONoEvUYw3Smbw7EtDDn4z+iqVya4ovKElefr/td6J uLyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KanOmSJR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bz25-20020a056a02061900b0055c1760dd8esi2237690pgb.380.2023.10.20.06.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 06:38:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KanOmSJR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DE3B782999FD; Fri, 20 Oct 2023 06:38:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377084AbjJTNh7 (ORCPT + 99 others); Fri, 20 Oct 2023 09:37:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377002AbjJTNh5 (ORCPT ); Fri, 20 Oct 2023 09:37:57 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65A4319E for ; Fri, 20 Oct 2023 06:37:52 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-53142351997so196650a12.1 for ; Fri, 20 Oct 2023 06:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697809071; x=1698413871; darn=vger.kernel.org; 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=GXLDllsQlfgcB0N053/Ac6iwia8k1MwiyVxT73CFT+w=; b=KanOmSJR77LdIATF9x0+FOboSsT3l1lIepOayQ+9YTSa8dhHXnKYQkMmPWhfm58RWn q8XiVdkk7bTJ9P8NbPIDilgQ0h6W3xjB61/3fPfW8bK9sPALPU5AbjmOUpW2wraw8gfX CS7hXDqAgKaH9g4wVlmWrZtuRl8ptpvuE29ahBYlYA6AZf07BHYwKhJNBgIcqsUwMvqJ EWJG/cnybB8gXEL6G4Wns77ERBAm/lHJAgjKdqmoGWOgGBx0s2ZWM6r/VWgmUYxFcU9i NhMlncabKV/I9cSm1hGCxKsaRfWzvdzCBfM2jTnfazgXcm5UsZNkb4P2IiNY6y7un7QN JXOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697809071; x=1698413871; 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=GXLDllsQlfgcB0N053/Ac6iwia8k1MwiyVxT73CFT+w=; b=YmPTHKyHjKVLOZ6sHjg3aevZzAKWpdZ6KpAuAuty1OZMey3qd/f+xtzCxZ9/UgLNl+ 9eeEV7PUGjMeB4TINM9LM7Yl9aFPo9WkJ+NO7RV3nxIkXobFSzuaG/LqmS1y1WFxmiRt TOHKTVxPXrTqb/IL2qT1WULIytlff9iMOubadVKKDw58OFUbCYaxrTHrV0RgERfKubPt kSl6EI+d/8fKR1eeEbnZFUvfb2N1TJ7ZppA2Fybb7Kh+F7gnAFB+l+HKZROOHUSEgIse bDsU2x3nehq4Re3AWdY9uK/KqRiUeb+uGetQhDMTHs7PBvFUdTYensoQDUWNLnqJC1PE ATpg== X-Gm-Message-State: AOJu0Yyt5QxzfeaOCj9m8iMRAkL0yDcCdogjKHS8e8EtQEjuUb2qcHKv C8e0ye3/I9hp8J5KlnRoV+s= X-Received: by 2002:a17:906:224b:b0:9a6:5340:c337 with SMTP id 11-20020a170906224b00b009a65340c337mr1381169ejr.2.1697809070633; Fri, 20 Oct 2023 06:37:50 -0700 (PDT) Received: from ariel (dynamic-2a01-0c22-358a-4300-dabb-c1ff-fe05-d863.c22.pool.telefonica.de. [2a01:c22:358a:4300:dabb:c1ff:fe05:d863]) by smtp.gmail.com with ESMTPSA id m10-20020a170906234a00b009b29668fce7sm1505464eja.113.2023.10.20.06.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 06:37:49 -0700 (PDT) Sender: Emanuele Rocca Date: Fri, 20 Oct 2023 15:40:42 +0200 From: Emanuele Rocca To: Mike Galbraith Cc: linux-kernel@vger.kernel.org, Michal Hocko Subject: Re: Runtime overhead of PREEMPT_DYNAMIC Message-ID: References: <7a818250a8f36476f13b57a172fdb1ab23645edc.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7a818250a8f36476f13b57a172fdb1ab23645edc.camel@gmx.de> X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UPPERCASE_50_75 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]); Fri, 20 Oct 2023 06:38:38 -0700 (PDT) Hi Mike, On 2023-10-20 02:42, Mike Galbraith wrote: > It's kinda hard to imagine the author's mailbox surviving submission > day were it _that_ horrid, surely something is amiss. Thanks for trying to reproduce! Let's see if we can find out what's wrong in my setup then. > voluntary (my usual) > CONFIG_PREEMPT_VOLUNTARY_BUILD=y > # CONFIG_PREEMPT_NONE is not set > CONFIG_PREEMPT_VOLUNTARY=y > # CONFIG_PREEMPT is not set > # CONFIG_PREEMPT_DYNAMIC is not set > > dynamic (same config, just flip dynamic switch) > CONFIG_PREEMPT_BUILD=y > # CONFIG_PREEMPT_NONE is not set > CONFIG_PREEMPT_VOLUNTARY=y > # CONFIG_PREEMPT is not set > CONFIG_PREEMPT_COUNT=y > CONFIG_PREEMPTION=y > CONFIG_PREEMPT_DYNAMIC=y Here is the full diff between the kernel configurations I used. The only change I made was setting CONFIG_PREEMPT_DYNAMIC=n, everything else was a consequence of that AFAICT, but please do let me know if you see anything that shouldn't be there. --- config-6.5.0-0.preempt-dynamic-amd64 2023-10-11 15:30:02.000000000 +0200 +++ config-6.5.0-0.a.test-amd64 2023-10-11 14:30:02.000000000 +0200 @@ -125,13 +125,11 @@ CONFIG_BPF_LSM=y # end of BPF subsystem -CONFIG_PREEMPT_BUILD=y +CONFIG_PREEMPT_VOLUNTARY_BUILD=y # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set -CONFIG_PREEMPT_COUNT=y -CONFIG_PREEMPTION=y -CONFIG_PREEMPT_DYNAMIC=y +# CONFIG_PREEMPT_DYNAMIC is not set # CONFIG_SCHED_CORE is not set # @@ -156,11 +154,9 @@ # RCU Subsystem # CONFIG_TREE_RCU=y -CONFIG_PREEMPT_RCU=y # CONFIG_RCU_EXPERT is not set CONFIG_TREE_SRCU=y CONFIG_TASKS_RCU_GENERIC=y -CONFIG_TASKS_RCU=y CONFIG_TASKS_RUDE_RCU=y CONFIG_TASKS_TRACE_RCU=y CONFIG_RCU_STALL_COMMON=y @@ -1009,7 +1005,11 @@ CONFIG_PREEMPT_NOTIFIERS=y CONFIG_PADATA=y CONFIG_ASN1=y -CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +CONFIG_INLINE_READ_UNLOCK=y +CONFIG_INLINE_READ_UNLOCK_IRQ=y +CONFIG_INLINE_WRITE_UNLOCK=y +CONFIG_INLINE_WRITE_UNLOCK_IRQ=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_RWSEM_SPIN_ON_OWNER=y @@ -5395,7 +5395,6 @@ CONFIG_MEDIA_CEC_SUPPORT=y # CONFIG_CEC_CH7322 is not set # CONFIG_CEC_CROS_EC is not set -# CONFIG_CEC_GPIO is not set CONFIG_CEC_SECO=m # CONFIG_CEC_SECO_RC is not set CONFIG_USB_PULSE8_CEC=m @@ -10597,7 +10596,6 @@ # end of Scheduler Debugging # CONFIG_DEBUG_TIMEKEEPING is not set -CONFIG_DEBUG_PREEMPT=y # # Lock Debugging (spinlocks, mutexes, etc...) @@ -10696,7 +10694,6 @@ # CONFIG_FUNCTION_PROFILER is not set CONFIG_STACK_TRACER=y # CONFIG_IRQSOFF_TRACER is not set -# CONFIG_PREEMPT_TRACER is not set # CONFIG_SCHED_TRACER is not set # CONFIG_HWLAT_TRACER is not set # CONFIG_OSNOISE_TRACER is not set