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 F3F30C636D6 for ; Tue, 7 Feb 2023 14:29:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3BE816B00D7; Tue, 7 Feb 2023 09:29:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 36EAA6B00D9; Tue, 7 Feb 2023 09:29:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 236006B00DA; Tue, 7 Feb 2023 09:29:03 -0500 (EST) 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 140B76B00D7 for ; Tue, 7 Feb 2023 09:29:03 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9B8591A0587 for ; Tue, 7 Feb 2023 14:29:02 +0000 (UTC) X-FDA: 80440727724.17.6F3B30F Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf24.hostedemail.com (Postfix) with ESMTP id 95C8F180016 for ; Tue, 7 Feb 2023 14:29:00 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=aKxw9JI4; spf=pass (imf24.hostedemail.com: domain of axboe@kernel.dk designates 209.85.216.48 as permitted sender) smtp.mailfrom=axboe@kernel.dk; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675780140; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=GVbHcngcrxb+EtKZ7t6pGqbRT5EixlZslzmjZrbJg0w=; b=KqyQufui21BjDOT5Bx/e/+AN3A+U/3sb5v43nICnB/ylfD6qjJ0iWyoF6pjHuiC56i/1n/ p26AIUsTq432EWIdJCkVglp/pDDWYKGdYfhAmgVej+5nC+viBCNldA+8E6FlhjHk/lHXps 2D3sG2w8vg+zhXhLgA7XnOKCu+QMtfQ= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=aKxw9JI4; spf=pass (imf24.hostedemail.com: domain of axboe@kernel.dk designates 209.85.216.48 as permitted sender) smtp.mailfrom=axboe@kernel.dk; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675780140; a=rsa-sha256; cv=none; b=KNDDYk+22v84Pl9SYwTCtCib7Oe5TWhYSK5HNtZlhLBgfJqw/M7kg1TrkE8w0EKoBFXJ0N 2ILtanEt/JpiAKfa0Kn3/HZw/BXpAt9zw9U+RsEipbaSS8uVTDYGwRDcWnEyzQEp/x7ZzH /orltS2jIycWhcoxmlMlRFluabBMQps= Received: by mail-pj1-f48.google.com with SMTP id bx22so12250996pjb.3 for ; Tue, 07 Feb 2023 06:29:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=GVbHcngcrxb+EtKZ7t6pGqbRT5EixlZslzmjZrbJg0w=; b=aKxw9JI4eNRmyEHa8pZiz59fi5N4wmsEKjVGoh78GkaeojSICmHq3P/0QQJjtCGoWY tVUtigRisgv/MaRvcsGvEaqU5XmI7siMb3JEJnqmaq2u6k0l1sDvsFB15Cb3uF8PyZnT /lp77ze+OK18ZTdBsQRqjUyC9LLE2R/xvF10LbmVqHfJv+TZlYTm7yhVjWnSnaQ84Pyk dP7pEXBu+ifEiQwpYfRYaQau+ZxgsvtXeyCfxTRkBkXPmZVSeu9YejJ+1MaIfZBocaeo Nlz2geKB6sc8dNPfmPhlRaSX7xgjR7f/h34Q41hurGXg2yT6yNMdJQIYKFDQOqi2K+We zc4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GVbHcngcrxb+EtKZ7t6pGqbRT5EixlZslzmjZrbJg0w=; b=DJi9sL6HTZhJFSMWeVcfHwW0SYl1xOt4raDAqBP6kbXWSw+xdecZ4Zu1HyePrRgk++ FOwja/3WppcfU8rfQSVxXojR4WxPNgLA4GrFQNLcp/IsmJTw/Xcd8AcTddGUvWrnYgAl 7106SBdKODfAHiXyPOja+J45b1r8TUl/oeiGI0qiq28mlIbAYiGja6Wrt4v9AZTBf6/Z Qh2ioTpQFr3v703nruVCs4XSlpA5MhN9hrn4Ys77mtyXfNYoZZ7I/6KJXHJWwjHUTPvl tyk5azDLEObwEIotaExP+dFHP2/kgcRNyNmivNqMUxSsR+8SEx2Oumbejr4BRo1Udp8U HWCw== X-Gm-Message-State: AO0yUKWGb+Hhq7+OtiAgqOB6AO0nBrSy/s6iSbuPvINc3siYbNwT9JMW bS8YYqcr9L0HBBEDNFiPeNMT3g== X-Google-Smtp-Source: AK7set9MKzN9TnSmA0Lxp77fPjhgxhnGyzjVDYWLWGw+37wFdUVt/E4zaet+bYlKWvMXhVTK++Snvg== X-Received: by 2002:a05:6a20:8f17:b0:b6:7df3:4cb2 with SMTP id b23-20020a056a208f1700b000b67df34cb2mr4265712pzk.4.1675780139269; Tue, 07 Feb 2023 06:28:59 -0800 (PST) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id b205-20020a621bd6000000b0058bc37f3d1csm9279979pfb.44.2023.02.07.06.28.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Feb 2023 06:28:58 -0800 (PST) Message-ID: Date: Tue, 7 Feb 2023 07:28:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH 09/19] io_uring: convert to use vm_account Content-Language: en-US To: Alistair Popple Cc: linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, jgg@nvidia.com, jhubbard@nvidia.com, tjmercier@google.com, hannes@cmpxchg.org, surenb@google.com, mkoutny@suse.com, daniel@ffwll.ch, "Daniel P . Berrange" , Alex Williamson , Pavel Begunkov , io-uring@vger.kernel.org References: <44e6ead48bc53789191b22b0e140aeb82459e75f.1675669136.git-series.apopple@nvidia.com> <52d41a7e-1407-e74f-9206-6dd583b7b6b5@kernel.dk> <87k00unusm.fsf@nvidia.com> From: Jens Axboe In-Reply-To: <87k00unusm.fsf@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Stat-Signature: tnjc4sux3qhjbmjfdjpyaafg3cqmc9xp X-Rspam-User: X-Rspamd-Queue-Id: 95C8F180016 X-Rspamd-Server: rspam06 X-HE-Tag: 1675780140-960130 X-HE-Meta: U2FsdGVkX18OIT1ukfnDX6CJlQZeLDz05q27AvyQjpt0FFJUBbaUo6xlwMlmUcQckyFl5pnn8OlnQVdcbqFx1+nukYZDP/JYbenqNBcEqqJ3oKNYq6xQHjVL7NCBg9b2fhSdYDRdazUrTNa+c/KFbCAgHyyfu91lraTYQT/fJw+uAWBWqw7vp+8lqRXZOwRVEwatYHbCDEOyJG8XiSWq/LsHFF4Xfgk4YSRi43vbl+xHyMVOBcPVQmBZXWZtysmdJuOnW0lVYLB9vJ7dmSWvi1j6v0M976ycE1LBUJfyU+VYH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JZwqFmduRypq8Li1iCrCvsGF455JLCi4LmG4dt0nM+X9LE3YHOGdFsbP2p9RTIF6P+6VK9to3Dg30qHlxaQzHgTOJtWHIfAqBHpH6hD8/TK47nXpvTBfxA1O1XUKToMOooC6ViY//y5Yq0/kRjctNV/BXeiSdx7UcHzWAYenicILNJcn9FTgRgwgk55ho3+yjg4qglEWe2+LrNHwya 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: On 2/6/23 6:03?PM, Alistair Popple wrote: > > Jens Axboe writes: > >> On 2/6/23 12:47?AM, Alistair Popple wrote: >>> Convert io_uring to use vm_account instead of directly charging pages >>> against the user/mm. Rather than charge pages to both user->locked_vm >>> and mm->pinned_vm this will only charge pages to user->locked_vm. >> >> Not sure how we're supposed to review this, when you just send us 9/19 >> and vm_account_release() is supposedly an earlier patch in this series. >> >> Either CC the whole series, or at least the cover letter, core parts, >> and the per-subsystem parts. > > Ok, thanks. Will be sure to add everyone to the cover letter and patch > 01 when I send the next version. > > For reference the cover letter is here: > > https://lore.kernel.org/linux-mm/cover.c238416f0e82377b449846dbb2459ae9d7030c8e.1675669136.git-series.apopple@nvidia.com/ > > And the core patch that introduces vm_account is here: > > https://lore.kernel.org/linux-mm/e80b61561f97296a6c08faeebe281cb949333d1d.1675669136.git-series.apopple@nvidia.com/ > > No problem if you want to wait for the resend/next version before > taking another look though. Thanks, that helps. Like listed in the cover letter, I also have to agree that this is badly named. It's way too generic, it needs to have a name that tells you what it does. There's tons of accounting, you need to be more specific. Outside of that, we're now doubling the amount of memory associated with tracking this. That isn't necessarily a showstopper, but it is not ideal. I didn't take a look at the other conversions (again, because they were not sent to me), but seems like the task_struct and flags could just be passed in as they may very well be known to many/most callers? -- Jens Axboe