From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 B12B213B284 for ; Mon, 8 Dec 2025 17:32:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765215150; cv=none; b=fbahSEacFgsFcmBKbCChBuOmqZH0GzAoq3n9oQcEs1XGNQ1ExpeTulL9msxWpEqMasCCwe/Y3zg2Vp5T/aIh4ieV8VUJYJdEw/Z0glrcbSpf9wnOmxms9oCmSjAoQ+wlOmOH/RWZURwb+ECUgukeGHJHlFQ0TeEfwpv5DeVCF6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765215150; c=relaxed/simple; bh=5ImoAOav3QSxXhj/nos1U2zRMFflG9gABFr9ntjemlc=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NfmO/9rwrAE7hSzOzCr4AC9aCVau68zq/XhiEqy0gZTMhwvQY+Y+eBL9ryk1c1sWFj48+QyBuKToypuIxbLY5Ghu3QlNG7e4g1y46QFaHm+Ewv44jauWRwhs9Qvyt6bYL0MGeOhhykDFiTsBejDIar4TvGji4NlE3k6xU2X9Jjw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DkmpEXkb; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DkmpEXkb" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-597d57d8bb3so4019006e87.3 for ; Mon, 08 Dec 2025 09:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765215147; x=1765819947; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=kvvNrbzxfKIfhL9wonNMP6XRUhQd8y0eo6+8602KYfA=; b=DkmpEXkb3z2n9JU7rYIhXqNjz+uwNm/Az+lQZC4hK5nKtnO8Msd6euy102fN/LWUjp L7P098HjCwmF9qqPpd6lx8h44sJe7jsg1P+/TWNB7eIrWn51ZZSXLgeihaes+Gh63WaF aRVq0UldmzsN6eBftcjLZZBjwnoa6rgqQveI0tCjRUTbooo5CPNF7dUx8lFjC1eBAgUT j6mDcSlBEWEexAAFFdi2lGUWiXcPAoxA+2sBhFTqRrt27N1IRanF/69MsrPdW2c0+Uur jpfzwKIEZTIvSz1Aq4OA/H5KXylW1u6WdKTCthb31qwvOs2m+QJOHV/3ywqof0LzbXlc A7Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765215147; x=1765819947; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kvvNrbzxfKIfhL9wonNMP6XRUhQd8y0eo6+8602KYfA=; b=lFxS46kyvVdOuAG0yOmXPhNFbkSGPgFc4LUMcXz/povAVzAvq29XUKkSdAvKEU+4WJ jdGuDo317RhxFD1i648KmvgWshVwv/JW+e3Z0pv11+JRS7bO5GEa2Wp9+ReDQAd5QVIh 4ejCWUbdXykBrsBo117QVftd+7/p7SmPFD7Nx/1yId4wCQYx3U0y3n78U2kKX2nHKLAf n43JM+URHPulP5/Y1a/UhQferOFtHXY182k3Gtu4VjAyDoWmeEEQze5fudv+zryw4igI vs2ea/M6/rbRz6qKzbFQuqaUD/ACDVq+up/0w0ad19OiS8gKvm+/OAqZIN1Lz+/DtsPc IO0g== X-Forwarded-Encrypted: i=1; AJvYcCUBGdYEB8K+LzlDzkgCmizQ4u9Gl+C6UUPUNDZWG6wRBdfXn1tFyBU6+Uo6qjIN+9Rg4sYxcNs6lePshvY=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0NEcUt9IrVtTdCtFVvOOBB4GPoYhQnxn92ZCmYba7AFzxdZzE Yvr+W1LFUVC/uOqUa4p6fucsfXQeot7f+OL/aKgMPcaCraUs9ya+tJOI X-Gm-Gg: ASbGncvxDJbpOthReTnynP9SrNnRG0laOI8TUvLhDJDWK96kYlE3fZhbVHwq0kKFL/v nfPPWsbEjvZYvE1hAf7Iz+jJfpJTVM8wjvWYGv5aXuWSbznTx7nYAJngi+XWt8+Is79xLZpDZvK SYOBX7458TgejPnroNcvtCPqDP535TDS7WbqJPPQ38ZZpZD4aneBzDYuHlKyW+lDZkaYUM3F90q fXlNTOKpPB0h4jQ9usPpE7zJbkeb29zkEyasZ1i9t+fqOVvrGVM9Ni4maFzcfb5cKb9DxBLQWKr K7MslZeIcX8jGOhw6xewIRv1mF4LX5W/c9PjGnI1ssqgiGz2yX/486t3ma8JauX7RJ0yOOJuMjs G1P4Rc4GauK6F1t7SS7Effv+KU61b0K/5nfapjty3MWb5VyT3V/X6 X-Google-Smtp-Source: AGHT+IFsm7rxgn02r1lDEyDh6oMhj9/rBDOaoFL0QYsFnQGFM2lDhg6gWYfXyuZuPifV8on94YS5pg== X-Received: by 2002:a05:6512:689:b0:595:90f9:b9d2 with SMTP id 2adb3069b0e04-59874372abamr3094454e87.3.1765215146407; Mon, 08 Dec 2025 09:32:26 -0800 (PST) Received: from milan ([2001:9b1:d5a0:a500::24b]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-597dfc08b25sm2722262e87.6.2025.12.08.09.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Dec 2025 09:32:25 -0800 (PST) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 8 Dec 2025 18:32:24 +0100 To: Brendan Jackman Cc: Anshuman Khandual , Andrew Morton , Uladzislau Rezki , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/vmalloc: clarify why vmap_range_noflush() might sleep Message-ID: References: <20251208-b4-vmalloc-might_alloc-v1-1-94a9bb8ecb08@google.com> <96aa9bf7-1f1d-4870-90d2-84d3d6d4254c@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Dec 08, 2025 at 07:39:39AM +0000, Brendan Jackman wrote: > Hi Anshuman, thanks a lot for taking a look. > > On Mon Dec 8, 2025 at 6:41 AM UTC, Anshuman Khandual wrote: > > Please add in mm/vmalloc.c - otherwise it does not > > get built as GFP_PGTABLE_KERNEL is not available. But otherwise LGTM. > > Oh, but that's not correct, IIUC we shouldn't directly be including > asm-generic headers from here. > > So while in principle GFP_PGTABLE_KERNEL is a sensible common > demoninator here, it doesn't actually exist at all everywhere, e.g. it > doesn't look like m68k defines it for Motorola. > > So maybe the best way here is a really vague: > > /* > * Different archs allocate pagetables in different ways, assume > * GFP_KERNEL as a common denominator. > */ > might_alloc(GFP_KERNEL) > > ... a bit yucky but I think still useful. > > Any thoughts? > Maybe just add a comment why that might_sleep() is there? We can simply state that page table allocation path is hard-coded internally to use GFP_KERNEL flag. Thanks! -- Uladzislau Rezki