Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3349390rdb; Sun, 10 Dec 2023 01:55:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IF137F/F9vsfZLdSPHKSKLXC+r01aTjlQcYSZFQzoTQoKda94ZW1fKBOjs/opyQWbrc2wrc X-Received: by 2002:a17:902:9f87:b0:1d0:6ffd:6123 with SMTP id g7-20020a1709029f8700b001d06ffd6123mr2823945plq.69.1702202150823; Sun, 10 Dec 2023 01:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702202150; cv=none; d=google.com; s=arc-20160816; b=jFNMpS3Q8gwKzyxJlrlqgXGmE60u9HdzIUSwOmjp6iCbZ0X8oRqY38hFcBtMvP7g6F Qbn56683GynEjxBBjlLylujgFpzTMHIXq1frRyVs2VkGhJp5ujUApXwGGa/MrY6IgzFc R8gtaVRbPo9sSXzM7hHuzJVHaECG9vE4Ryyz+jELAAA3DS8EihshvV7x5/WPRezKkIDV 7ZC8054xpmfVSfUq8XizIG/1bgt99vOFfKaBT2+7dtvJF8t/NGsQfg88OQxY8MmSxM1w u9sqVn+MS5tRJ7JDznPW90h9Jzf/Pzp0b2Ym852ar8l4FQ+2aM4znDt28E2KbbFYeTCv HSVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:mime-version :dkim-signature; bh=SBN5V2xM9cTtPQfPukDl8dzX6O5lxBQp1fRUUmCSAFA=; fh=TYKZJtwuVFpnjDBSiywgrw68CnEntq0Nqb4QpcJ9TdU=; b=Wj0rjJzzs0IaJz06AbLDAPOcsWD03OX2+CoSPEoFaNX86EimoVxCPtK2FuEWYeZNDW AdDa8Vv4hDHKfqcC7ZR4eAexM1xiVoO7koJ7vl/jCR/GqzciU8kkwNqdOMvXELJibz/p jKn5qhLnzaI7tOj6o0ybaDAcgTnJB0RWjlRKM5r53U690xEhWD3hIEXTBYhkroNohyU4 Whrzs8fs8/9FCmasRp2IleXyPwA93Kx9X7zSKlvdEuY2X29f+L4LTeBhYmNqZwc8RnlH ElCjaW5UrlfRV+2qePJkimAbpO0mqHwvTI1psMAdmRdtTOiK4mC77GR5pN93mRaP20ED NqXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IUU2vAOg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id t7-20020a170902bc4700b001d0748f1dffsi4245973plz.162.2023.12.10.01.55.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 01:55:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IUU2vAOg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 0FBD7806226B; Sun, 10 Dec 2023 01:55:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231783AbjLJJyo (ORCPT + 99 others); Sun, 10 Dec 2023 04:54:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229758AbjLJJyn (ORCPT ); Sun, 10 Dec 2023 04:54:43 -0500 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A17E5D9 for ; Sun, 10 Dec 2023 01:54:49 -0800 (PST) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2c9f559b82cso39210701fa.0 for ; Sun, 10 Dec 2023 01:54:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702202087; x=1702806887; darn=vger.kernel.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=SBN5V2xM9cTtPQfPukDl8dzX6O5lxBQp1fRUUmCSAFA=; b=IUU2vAOgzVALJVjzZQOyg6n1qYUm5qgxIYfFC8nIG94CJBeqWpGHjdgmowOS8xeUZm GiduzRd+acYP9o7YrfghWn2CV659PhjIafsGqBp9pv25Ooh/tjegh1Ckz0fqOA5S/iOH XhDeM0NlXEPmiIUornvBwLSyQBzyUDpd2Da4Rze3dvgPgYp4tctbJ3CtUgwpry7twAG0 hQ1t3xDD97oGUgOVIT9KqVWymF+eR911WSXPetCYXM44BFPM2GTnNozTveYoid1mss7L JE8fXEgDz8jZt5N8JcQYyiNnnzeZhE7Bs7HUEyYOTSgImN/CMhgZgyMM4dnGlVG9VnzO 1uEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702202087; x=1702806887; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=SBN5V2xM9cTtPQfPukDl8dzX6O5lxBQp1fRUUmCSAFA=; b=sFY6zXToHdvo3GEsJO+V+Scsr79C5VXUHogGNDjgFMeTvoe2/1QK8pzm292kv4SKZc dcK/8TLY6HkUIOZiue/hnwoXAefqbOfC27C6U18WjQ2NOobzr3cdaarze3m68ZmGpBLn SHskOQolWkzRCMH+OblX9ISxahDnafwxW71O9WSSBDTpj0P1KfaNWTtBBivn7YnLIPzT uT1peyZBwmnbdy+ax5W6dpWUMhoo4DhuTieAJCtLbrLV0TIHPuiM2HcTw6ouIXGMDcbT hzXrZbO7nXz+Bc+ZnuanWSVx8YAL53riupP2+Bcv6vxLvNlNB/8LsQFdDURcfEa/Mdn/ khNw== X-Gm-Message-State: AOJu0YxoU4dou5lXZs9l8xrHxGvJigDrm8G5HKVcUOCyy3jJ4CUZR3Mt rPSPtp6UVME3RlbYvIJm8ptG+s2iwWio4GNiDZLkd2/Yz/I= X-Received: by 2002:a2e:8796:0:b0:2ca:fb6:e732 with SMTP id n22-20020a2e8796000000b002ca0fb6e732mr925845lji.49.1702202086910; Sun, 10 Dec 2023 01:54:46 -0800 (PST) MIME-Version: 1.0 From: Ajay Garg Date: Sun, 10 Dec 2023 15:24:34 +0530 Message-ID: Subject: Preemption VS Interrupts To: Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 pete.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 (pete.vger.email [0.0.0.0]); Sun, 10 Dec 2023 01:55:46 -0800 (PST) Hi everyone. The API "spin_lock" disables preemption on the local processor. The API "spin_lock_irqsave" disables preemption on the local processor, and also disables interrupts on the local processor. Thus, is disabling-interrupt independent of preemption? In other words, can an interrupt still "preempt" a critical section code even if preemption is disabled in the general sense (on a non-preemptive kernel for example)? Will be grateful for help in this regard, as it will clear up the fuzziness going in my head. Many thanks in advance ! Thanks and Regards, Ajay