Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1402989lqh; Mon, 6 May 2024 06:54:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUXJ23NxvXXiiOrIzXAFnvN7vBNXH1miBNzeZa+nwn0aEkNZnlLKAyRlacMnd3geUCl19tEcSW1Tb/hkHKZEar7mtLkDuUub9NAop7mWQ== X-Google-Smtp-Source: AGHT+IGb+2GKLsm2rpyWlalmNf6dkjgz4M/53PD5tq9JmkgSgkXj1w7zou6eeH2gZ5ohJx8B83Mh X-Received: by 2002:a17:902:f70c:b0:1e2:9ac2:4a03 with SMTP id h12-20020a170902f70c00b001e29ac24a03mr12181247plo.28.1715003642396; Mon, 06 May 2024 06:54:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715003642; cv=pass; d=google.com; s=arc-20160816; b=MuhNUIxe0gEnq1FhB9BiYVkv/V8wPtaKz0ZMjsPtqXFIcrWmeiw6KZNh7muAhfhmv+ 1cxgOMualV/8HMZNqKyBOgJa4eBlFTdRvELYtDD8PrfiQZcTzGurdc1ZtW7IJAqspzUV No0iSL7xKsg0cY93XYPyDas0lWId+AcODWy/ObDrSOfYUZFoCTFCI/5/8qaRyL7FNdpd PB5Sp0xjQxbsiNWTa+Sf3xPMWYiyWwrXfA0Mp+u4+GW/PLVpFAd0z6yfDrsg8p1oKNz+ nQNX5ORGwVp9IfUnnRkFqT+kuLLS5X8rGUsQYo8008maEsSFhZneUrUh0OW3fpsWdLdK Sp/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4wGZZWr50vBbs3Q757bfPI+FzVZjlv4CH/7/r+l/niA=; fh=chIP6LJzupo6gs9foL3Vg66PLX9wF/fyrW9qnZ9YS8E=; b=iw20gkdpi1t6GkaawIdIzZCe1kg5XdePnCVymWM27coZUnTVsgzL/20qiK0mVwdXuo qDRDS8X2zZhGi/C341rpICQTgOq2KOykSOfLYOFyBH0JjIhOb2AEOgeLrn0PosFHCZbI 3nFtVBPGMVuFrGmpZSspBZdp3VVS3W3mU3X9YczsQUChgCp3cdFO8KMcaf0DqZ6X3Eov nqtPUGSAvXBvtMXCy3GhYvhjUS3SN8sn0oW651jCVw4sJLhshnqk4vkMN1Ve7qF+gKCW 394NAUXf70T3LQDWQBbNpizbZZZQJ7fjOcocYZYtuQEhZ1pIFqZV+X91o5aC/dTXi5Yt UrCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=BgbMRQ2W; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-169931-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169931-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m2-20020a170902f64200b001ebe5c06450si8700654plg.247.2024.05.06.06.54.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 06:54:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169931-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=BgbMRQ2W; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-169931-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169931-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 05FAF280E30 for ; Mon, 6 May 2024 13:54:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B6D280046; Mon, 6 May 2024 13:53:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="BgbMRQ2W" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A53F27F7C2; Mon, 6 May 2024 13:53:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003636; cv=none; b=GA+7hK9KYq9+1QsFBsF/fQhbAd55JFVwsH5Vu0VUptXaekC+xLbPkZMnal5P1SZ7KVoADbbtVw2K8hD39jS9j6UkgC+PZdhCpJD6uuOCuo6AkvlxsXAXTEvAs/evVfm9C6Lm7gSvnSZ1I7Go+Ix7afFh/NddYyYI1s/94uoifWU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715003636; c=relaxed/simple; bh=4wGZZWr50vBbs3Q757bfPI+FzVZjlv4CH/7/r+l/niA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=APA7t5eVniSlG9GinBHk3gsmr29ewvxN+qWVtA3Bj+Vqve0y+lypneI1jqtB07w+KbaVT4FNTwgccuoLYOsgpp+qFpLDbh40oeQAgBGVtgyIGFegD8qRoSYAtxAjqqLVg91SE52eiO7A8jTCE2UfNdbBuks8vELNtwH/3pm6iRY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=BgbMRQ2W; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4wGZZWr50vBbs3Q757bfPI+FzVZjlv4CH/7/r+l/niA=; b=BgbMRQ2WdJfHA20fF1oQAn25cc jk87a5yBwfhlKEqjjW7Y6pqP7s+X2z+DuZHBnN2S7F/XmSK6495gokjSa+o3OpSveFSYZinIULhEX ObCJ6LLabA9MUHJM0obz5AoKxkLDASvN1Ynn1M+O/MRerqv/+CVKvpb81pPuCaKgLb+xGM5KXNGCx 9CClxA6t01knOSFEImNBBIV3O90uZj4XdjPR3MCmmDjkLr0OvOp59MZZ0Ew8PFixxUN8tbnnSvrf9 F6yMyja3qhr2eBstJDud8D/7jxA6R8Nfy7lJGa5potIiUsudHdsRJWVNOWpG9qblitFgKT8NxUqUd UT/95xkQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3ymp-0000000B3XI-3waU; Mon, 06 May 2024 13:53:47 +0000 Date: Mon, 6 May 2024 14:53:47 +0100 From: Matthew Wilcox To: Xiu Jianfeng Cc: hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, akpm@linux-foundation.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] mm: memcg: use meaningful error code for return value Message-ID: References: <20240506133643.1124102-1-xiujianfeng@huawei.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: <20240506133643.1124102-1-xiujianfeng@huawei.com> On Mon, May 06, 2024 at 01:36:43PM +0000, Xiu Jianfeng wrote: > alloc_mem_cgroup_per_node_info() returns 1 if failed, use -ENOMEM > instead, which is more meaningful. This should probably be changed to return true/false instead of an int.