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 6E537C636EE for ; Wed, 28 Aug 2024 19:26:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD8316B0085; Wed, 28 Aug 2024 15:26:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D87F26B0088; Wed, 28 Aug 2024 15:26:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4F336B0089; Wed, 28 Aug 2024 15:26:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A6CCA6B0085 for ; Wed, 28 Aug 2024 15:26:49 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 5716714068A for ; Wed, 28 Aug 2024 19:26:49 +0000 (UTC) X-FDA: 82502636538.12.B92A8E1 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by imf25.hostedemail.com (Postfix) with ESMTP id 3F8A7A000C for ; Wed, 28 Aug 2024 19:26:47 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=suse.com header.s=google header.b=FWtpNMml; spf=pass (imf25.hostedemail.com: domain of mhocko@suse.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724873163; a=rsa-sha256; cv=none; b=cOwc56cBfte+Y+GC8rY0w2rW8iQXDNkTe+uqDqe3NpwN29d8x3QL8FnLaUJbxwBcKU9Fzt hugePZJczfQmTNmyR2PQeBRag9y7LRCv9r+2I6Ych3s/24qkaiediv98C23865/Ki0vbR3 gZ8l2BzdInwRmccP6Z4zFjwRp+Tyq3I= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=suse.com header.s=google header.b=FWtpNMml; spf=pass (imf25.hostedemail.com: domain of mhocko@suse.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724873163; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3BWPnH/8lZG8VOT7Muu9Q8tFJ7+yTh7np+tLLr9rmZU=; b=5Bx+Wojetc7AGgcvgiWEJ/zvPnLxNtAhYdvkt6KwrqdsXmazuoIFoRB8SLeiwau96RDuTC Ui1of3/H0fhc0QhXxlEz8RgOMmYZsmuvXKwHpSi2dmOr9oitnou+iEix6iVYmhXcEbmps1 8S/3WhLKggBcr0VZAaJoeFjPicMsmec= Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-3718ca50fd7so4521525f8f.1 for ; Wed, 28 Aug 2024 12:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1724873206; x=1725478006; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3BWPnH/8lZG8VOT7Muu9Q8tFJ7+yTh7np+tLLr9rmZU=; b=FWtpNMmlc+R5HHfSrgEqr7y3Dk8b/KcOj0AGP1+5jU8wvU5X+yNWKzUx6zK8PLbha4 iImf66FOXQfQEB9Ahj/pbOjmvwVBW5YEfy4mbjmot6pZ8bZTE8qIm6qrd4q4NtUAsF+W /cICd1o+6JKnKt9/gM1Dv49MJa5ZXahtRY/vLadDp27eCCGyVQYeLogqvJy9d8ChO5Os Q92QfGSk+YoUiXv8ZsRVT8KrKT+hKdN3izRgUABgcyx7MAVIN3HgBMVr79tEdOAmVaEa sP100uqsULHxj4vsqP2iyvrt/tzGyLB6a4zDc1vK7uKEMCWIYkxYrC9yR2lI37W0kn8E B2mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724873206; x=1725478006; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3BWPnH/8lZG8VOT7Muu9Q8tFJ7+yTh7np+tLLr9rmZU=; b=E03bA7hwlB0+S+cnfMxzNKHG3c8q45i4K5zld5Etfa741ffg12FlvNUSworl7qBbvl ATdZPJGr2bDPThJdbT66apeEb7NiTKM+DjnEAaoKXW325gkEZQiRswzPV8BPdP3IdU7v F6w1jcHlOkvUHs15qsg4rOlwbWjiP8/yL/C5A1BrfoKMOMVVMoJTMc/q95mktbo3xQET j20zudHkz0f4ptQRIQ2g03wKmhvR0YApY83AElCu/T/YCL5d3+OMzP+0YQCk5xrxY2sv ZiX4KnwZTWej9Riql+Oyz1pzak+/e6u+jEVTtbK5QI9kcHyN5/UMUv9D8lZHMtozEsLO Vwvg== X-Forwarded-Encrypted: i=1; AJvYcCV5eOYMrIi8UZ2fGAf3zPsNzs7CS3rk18vIg8Uo79CW3kqV7b/L47l6J0fTbT4DjaL/hzDo/VIJcQ==@kvack.org X-Gm-Message-State: AOJu0Yy3tQT45Vb47V3zwJzqh1/IW2VyuX8oq1MdX4Q819f3hQ3QPja6 zLS6EiFMbU+k4w3JIWwoM6TgOx/U/e2Mb7iYU+RrkVBCYfTWj10RAWofX/ut2QQ= X-Google-Smtp-Source: AGHT+IGSdX36+aZ+9SeTj1XTGLTshw7rKy42yJjltzlpBmSmdNx5/FIzbRURRgjLzDSYixg0ss1fwA== X-Received: by 2002:a5d:6652:0:b0:367:4383:d9b4 with SMTP id ffacd0b85a97d-3749b58f28emr314412f8f.56.1724873205639; Wed, 28 Aug 2024 12:26:45 -0700 (PDT) Received: from localhost (109-81-92-122.rct.o2.cz. [109.81.92.122]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a86e549cf50sm278878966b.79.2024.08.28.12.26.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 12:26:45 -0700 (PDT) Date: Wed, 28 Aug 2024 21:26:44 +0200 From: Michal Hocko To: Kent Overstreet Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dave Chinner Subject: Re: [PATCH] bcachefs: Switch to memalloc_flags_do() for vmalloc allocations Message-ID: References: <20240828140638.3204253-1-kent.overstreet@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: d1ift91nxdnney4otk5qcd47ah3znhk8 X-Rspamd-Queue-Id: 3F8A7A000C X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1724873206-483166 X-HE-Meta: U2FsdGVkX18WoKAitU/m0Cx6NppP2eRrlifz6Sbm8YuJvk7YSQMcwEznvvHAatfEIhHWcaTCCfHcmNJPbTDj4ehwiMOPklSm3h4Wwd7V0b/O8o5qWcYLOtgNlFxSjhmidgVQhlGWy5bpUGcsmAZmFpIDqnLHW7ttG/KnJjj9/GFdRQ6BmTtIvE7kVkg6atLPZngGBee9UAftUE8m0nwuKvB+CqoNV4SXsJy+N1yxWSPUb6eUtKxgZGZ0Kfx4JxHIeley99yoT/WPq092vWdnGcEyIuvJYpyVs+vZPTQ3g3qlu7wKnb0kIYXdwygU9IP1j+bvh0+YeSD4g74q0CVXQfwWVjaG0zvgCCjSTBbXrRSCOn6K1RGFy24VAmZQuKn1N/d4RHaK13dNKvK1KOMgYoIJsgS8jsWWFLnBwjxvmVJfvvQPyLrLDTPXnMVWkMUaJF1J0YjPAB5JzaDXfIBH2ognS1YJs+NnK5Hsrc4LpSmEovHVaaMKaqtCgHKRgNzD8IGBu3MoX1n6v0faTdm/0KpwfVGIM95Evb+vNPV5+5O5IK5xV4U2EXz2pwbRMqseOuMrGFdhSUGGjgA7RT45zkX/zQ2PFgWZ3iIILbIqFrTXe6voDoNzg4GwT23xP/f5qxVgS2uRkLhNMKn+617quCm/6spwS1Oz1yamfV7vvqok2sVTMONpHiGJEEODVtSXw/M8ux90bmJm8jGKOWAL2U9O8oJWC8CLPD0UeYGVlFHckPe9NXaax2k/freadvEgKH4lNWHi/qKNtJQC2RwGGbNtZsZNE/L+Djcjl48JF1JjH6eFt3mCpgMS5O7HxIrIJYIyK1z6HNKQ+cSUQBGll4Q5IoswqvHkEz3cnbK2bitxT8Vuar2deIgsEjby0xxspKNf1vmAQvxFYOfNGKxtQlizZW0fouJW96k1/5lPT/yVsaIZY/T+gbhNZEll4HW5KXw+kGKZn9OlCqHmfuF NLdmoBap KzCgQKyFQGUPZUQFZylgjQJsSsu3zNBjivHx7fPesHVto0R7bCy1pLtaDPeVmd2lqWArqczTsR3XvN9m5sa1taoxf+Q0MfepZ3Y+rmbDYsWGlExkcX/Q9CUtIKbQBU9AS5OoTVLKgY95YEwmuuZVj0pJfBOpjPMc021BYmADAv9SFpKIP44kaKrez3bfflS3pklNufwrsTLQnEXaBvdyCGFcDa86xTrhSxjGfm2VVZH1EoPbrfoL9Xpj5WPP+yv6dh9nbceBnjfY+3x2fsMnSojZRl5nBwnKUVW5oPZcDf9TI7JEWRQnP1oKn/IibPLI/NyWY5Idc/ZdLf04yGINEep1Yc2T9EagmTIr4 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 Wed 28-08-24 15:11:19, Kent Overstreet wrote: > On Wed, Aug 28, 2024 at 07:48:43PM GMT, Matthew Wilcox wrote: > > On Wed, Aug 28, 2024 at 10:06:36AM -0400, Kent Overstreet wrote: > > > vmalloc doesn't correctly respect gfp flags - gfp flags aren't used for > > > pte allocation, so doing vmalloc/kvmalloc allocations with reclaim > > > unsafe locks is a potential deadlock. > > > > Kent, the approach you've taken with this was NACKed. You merged it > > anyway (!). Now you're spreading this crap further, presumably in an effort > > to make it harder to remove. > > Excuse me? This is fixing a real issue which has been known for years. If you mean a lack of GFP_NOWAIT support in vmalloc then this is not a bug but a lack of feature. vmalloc has never promissed to support this allocation mode and a scoped gfp flag will not magically make it work because there is a sleeping lock involved in an allocation path in some cases. If you really need this feature to be added then you should clearly describe your usecase and listen to people who are familiar with the vmalloc internals rather than heavily pushing your direction which doesn't work anyway. > It was decided _years_ ago that PF_MEMALLOC flags were how this was > going to be addressed. Nope! It has been decided that _some_ gfp flags are acceptable to be used by scoped APIs. Most notably NOFS and NOIO are compatible with reclaim modifiers and other flags so these are indeed safe to be used that way. > > Stop it. Work with us to come up with an acceptable approach. I > > think there is one that will work, but you need to listen to the people > > who're giving you feedback because Linux is too big of a code-base for > > you to understand everything. > > No, you guys need to stop pushing broken shit. This is not the way to work with other people. Seriously! -- Michal Hocko SUSE Labs