Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp757158lql; Mon, 11 Mar 2024 17:24:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWj2EFeIMmjop4dpJUPK2OOlGllNPoPbcXkltjW0dyYssoVVCr6DVLwskfFKOVLD48oFhjAHt8QZKo8owJP314TNEPMhigmq1a2KkTJVA== X-Google-Smtp-Source: AGHT+IGTqS4mFedVjckL/H+5Vsa4m7rIAXRG9BkJXUJLFKwJPdOkO2QHm5CVBQOilk9LfydTF5hD X-Received: by 2002:a05:6a00:2d9e:b0:6e6:4907:fbc1 with SMTP id fb30-20020a056a002d9e00b006e64907fbc1mr10826867pfb.2.1710203071163; Mon, 11 Mar 2024 17:24:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710203071; cv=pass; d=google.com; s=arc-20160816; b=lX8TIS5DC355j7aYqh1haoY93Q/d5kXA0pnNzzovDkhyS6a76rV+ZHBtYqgmQqALfA 3wKRJdOoo6nVDJTbMwKNjIN6cJN3rQlRmvunY51EwZ2uXcvIBzXP5kApkI8j500rUCcc zaTSpX2COgR9yDuprFP38iIQFZAtRXpp1Eoj2zStbO4vsbFJAM5FuRgHgSNjQ9Ej9/M9 LXSja3kTbM79Gl8eTP+Zd1raAPuHq8enMowBpzgBxls4dSvvXCnWWq1JUFEX06d3dwuj iNaO4Qebz/Uw30imSjTE2eLT+dkTOHWR37UKD/HFzMxidm38HNR3Gu6mmVyoc5nm2Jvm ZfVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=fJF1VMAJYo3dGSmuMNLfw8I1xaRI9rtMN2Tb6jW3bD4=; fh=B8QgWRpwIxh9a5O4W9KLqTXkjrQvRhRwJqkM3IDxhXg=; b=eai5XeONA8LoSZI19ZtY89J80+WJy/VWZtVmemCD9ccG+PthxUw6946eSQoJ6Jpi4R GoZST3YjDdenQHT44ro6uihtC/8ty+0gx05kfd+M9Izt5FzWSFO7tDsSHHqV0BdjAfYg Q+P5iD9GhlRHOljN/fqw0FE4gr67Jp07a2bV12SKbzYWEJtyh1otnlA905TqOKXr/J2G q+DNyU+43sa9lo+j9pZgDzDCsBWROg95pb1q365i6m9Q+zyhPlHh4kaYzXIT/eBWqdqF 0u3dI5u1Hp3PelSNOnhmGu3HnaYAOV95lZPT1uUaTSJXtxnjWGfDoTjblO2PBsY5vStV 9k0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=dFkrjHfH; arc=pass (i=1 spf=pass spfdomain=soleen.com dkim=pass dkdomain=soleen-com.20230601.gappssmtp.com dmarc=pass fromdomain=soleen.com); spf=pass (google.com: domain of linux-kernel+bounces-99696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=soleen.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 19-20020a631553000000b005dcbb75b1fdsi5622112pgv.218.2024.03.11.17.24.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 17:24:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=dFkrjHfH; arc=pass (i=1 spf=pass spfdomain=soleen.com dkim=pass dkdomain=soleen-com.20230601.gappssmtp.com dmarc=pass fromdomain=soleen.com); spf=pass (google.com: domain of linux-kernel+bounces-99696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=soleen.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6268FB21494 for ; Tue, 12 Mar 2024 00:24:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 988A46FD5; Tue, 12 Mar 2024 00:24:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen-com.20230601.gappssmtp.com header.i=@soleen-com.20230601.gappssmtp.com header.b="dFkrjHfH" Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3ADEF6FB2 for ; Tue, 12 Mar 2024 00:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710203059; cv=none; b=YrTy2H7DBS26JEB/Xfo4BYoDskShYc1Us8XH39pBOF/TWqwemRvS2neQ2gMbrmEfgK888x67zFhTP9T6DJKd6A8jgfPBD2cn2esU1hYpVqd9ADkS/GUf/kajlf1a7IAyu7hKRTof4Hia8dVvRKIiCMr7wsLImX7ijap5HPPzSaw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710203059; c=relaxed/simple; bh=NzL/Vp75xGIC57+O+XJplTrebcORbU60q7vqYjR0nmw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=jyJd9uu3O9+/QstZVWTkN+gY5MsnXUxD9mMB+IJZIa0BaqX2NYwFt32hvQji7Fa2dhQRq6dQx4x7lCS/CG6PmelAvVfH9zqili3CsZ4vc0NFPbARPEL3vlJvHz8+fg1ubcIg/Wlb6oTBbTmxQllqJgQh+o+Kpn7+2ueQxvwxZl8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen-com.20230601.gappssmtp.com header.i=@soleen-com.20230601.gappssmtp.com header.b=dFkrjHfH; arc=none smtp.client-ip=209.85.161.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-5a222daa741so160257eaf.3 for ; Mon, 11 Mar 2024 17:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen-com.20230601.gappssmtp.com; s=20230601; t=1710203057; x=1710807857; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fJF1VMAJYo3dGSmuMNLfw8I1xaRI9rtMN2Tb6jW3bD4=; b=dFkrjHfH8VL/nbl2Asix84+hFxapX8PXmFgkSAJc7KJVoQW4CS9T0sRePS0duWdnSK gjZHxBbhqKlzWu3FCNj5jgqZ4YxfRc6mVFXu0kfiioSuieOHKoVW+eFGO0mT8ZPprS5x JFgTs785re5g9habRPSexwv218End3p8v7Lb/5C4uV3oCoRwRW2ZaJjfNiNqOaUr4ute Sd36VLPvZ2yCNhsH6kImkeRDv9rll+v8XdUq1j7BZsHA5U/0vm0dLwbprDRtBCAGy+W2 twcT0aeFuPSMlJyWOt7rLMtbMjtpuGMFptk2yjWhoIjjMZZdH8MtTzAMCTj6b09HrHPr pzqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710203057; x=1710807857; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fJF1VMAJYo3dGSmuMNLfw8I1xaRI9rtMN2Tb6jW3bD4=; b=nGbTIQek0xvsN0L2apfupFMdjPBva0F5AjZ3AWK6byLoox2fU5rzNDLxjNyEy0FgGn rnEs2RWme91hAiCxo0KFZgPfyIjboSbB98dGsP8FkxHE+WAHp/RRhPaZFb9vm3M7Jy3i Vk8Mu3zJ1PtTxiflH2RnxpeHr+enJ9VKZ7nWwrpLORIA16XtT2foxwMfJmjERGF9QX5o EHHyJiqTaVn5NcS8K9AMcKH0+hP4wR4ufv1vLeg8PSvwS+yzDtB5/pVFV9tCxBwSwdQ6 HSHWI3uy5jnD6O4qCDgLdgLPi+JnwRmdrymjHZ0M8SKCi2/mEvaCjDLRqIw/MuNF7Ubj AQrA== X-Gm-Message-State: AOJu0YyNev8yUR1vACe7DqIjEw9Mi55n17GKdnDbTASacHzjJTYywu8J sA9hyrCavrgo544P/GSQtDOYHJdKnMEJ4lZRgvQtSqwi2rLdRsUUz94395CZ4/UncjMFYN6QyUB QAhMBjT8xIYO7xFgcQIIaUvmB02aaTe8NhiltPg== X-Received: by 2002:a05:6358:8747:b0:17b:f744:968 with SMTP id q7-20020a056358874700b0017bf7440968mr5552144rwh.28.1710203057363; Mon, 11 Mar 2024 17:24:17 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240311164638.2015063-1-pasha.tatashin@soleen.com> <20240311164638.2015063-12-pasha.tatashin@soleen.com> <3e180c07-53db-4acb-a75c-1a33447d81af@app.fastmail.com> <1ac305b1-d28f-44f6-88e5-c85d9062f9e8@app.fastmail.com> In-Reply-To: From: Pasha Tatashin Date: Mon, 11 Mar 2024 20:23:40 -0400 Message-ID: Subject: Re: [RFC 11/14] x86: add support for Dynamic Kernel Stacks To: Andy Lutomirski Cc: Linux Kernel Mailing List , linux-mm@kvack.org, Andrew Morton , "the arch/x86 maintainers" , Borislav Petkov , Christian Brauner , bristot@redhat.com, Ben Segall , Dave Hansen , dianders@chromium.org, dietmar.eggemann@arm.com, eric.devolder@oracle.com, hca@linux.ibm.com, "hch@infradead.org" , "H. Peter Anvin" , Jacob Pan , Jason Gunthorpe , jpoimboe@kernel.org, Joerg Roedel , juri.lelli@redhat.com, Kent Overstreet , kinseyho@google.com, "Kirill A. Shutemov" , lstoakes@gmail.com, mgorman@suse.de, mic@digikod.net, michael.christie@oracle.com, Ingo Molnar , mjguzik@gmail.com, "Michael S. Tsirkin" , Nicholas Piggin , "Peter Zijlstra (Intel)" , Petr Mladek , Rick P Edgecombe , Steven Rostedt , Suren Baghdasaryan , Thomas Gleixner , Uladzislau Rezki , vincent.guittot@linaro.org, vschneid@redhat.com Content-Type: text/plain; charset="UTF-8" > > > > You can't block when scheduling, either. What if you can't refill the pool? > > Why can't we (I am not a scheduler guy)? IRQ's are not yet disabled, > what prevents us from blocking while the old process has not yet been > removed from the CPU? Answering my own question: single cpu machine, the thread is going away, but tries to refill the dynamic-pages, alloc_page() goes into slow path i.e (__alloc_pages_slowpath), where it performs cond_resched() while waiting for oom kills, and yet we cannot leave the CPU.