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 6B6C7C0218A for ; Tue, 28 Jan 2025 19:23:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E83FB28024A; Tue, 28 Jan 2025 14:23:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DE66E28021F; Tue, 28 Jan 2025 14:23:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C452628024A; Tue, 28 Jan 2025 14:23:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id A15E728021F for ; Tue, 28 Jan 2025 14:23:05 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 04C1C1403CB for ; Tue, 28 Jan 2025 19:23:03 +0000 (UTC) X-FDA: 83057833488.07.0EF7DE6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf17.hostedemail.com (Postfix) with ESMTP id D1AB840007 for ; Tue, 28 Jan 2025 19:23:01 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QejQ+AF6; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf17.hostedemail.com: domain of oleg@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=oleg@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738092182; a=rsa-sha256; cv=none; b=GRTagl7Nnb7DWsQNCUeqUzprxevKPCdHS0Li9oIbWvWbKPfoD+N0GHkg+EAiZiq8lbfA2q KVfdZ64rgQL0KPyk0kOQt8/LajkJ084SgaavevML3GGCdXp8fo0trqoYhDzABiH7niH8kC wRQCL2E7CDuK9l0yMuAfcLRsaVmkSVc= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QejQ+AF6; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf17.hostedemail.com: domain of oleg@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=oleg@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738092182; 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=r/nJGY2y4R/0VSOGdJ7GWzMTwlrgskERc4zlELxbjB4=; b=KJ6y0BcBas//MaKx+YithJ5Lj0dWOpxrJI455LGZSf4TsWScZZQ0mBCTuhTiT4a5000jJA qde4Wbq0SccCTZqzoa0Vd3jeoih4quKJKxu+asMssSiPKH+ulUwPNLqfyoi5/22TZlZcQR VQWJ2j4v+R+HpvOxsuZGCq5RffO3wZk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738092181; h=from:from: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; bh=r/nJGY2y4R/0VSOGdJ7GWzMTwlrgskERc4zlELxbjB4=; b=QejQ+AF67CI2S/iRycG7zbtDw2TCvv6mItU372zsOYflTvrVSXhBtnsc9PVWFYp0VH24nK XusEb9h9qzivQLnJjP8w3F2uMxa+DXI5UxUPbRqk/UzD8RYx4xg/Drw1eV/tHGbZ9s091n wEVQyV20r8QxSOj7QZPL40X8rLAE/GI= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-530-Y9rdxaquMPe4ifQz5-gjIw-1; Tue, 28 Jan 2025 14:22:57 -0500 X-MC-Unique: Y9rdxaquMPe4ifQz5-gjIw-1 X-Mimecast-MFC-AGG-ID: Y9rdxaquMPe4ifQz5-gjIw Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 75B56180034D; Tue, 28 Jan 2025 19:22:55 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.226.70]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id A2F0D1956094; Tue, 28 Jan 2025 19:22:52 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 28 Jan 2025 20:22:28 +0100 (CET) Date: Tue, 28 Jan 2025 20:22:25 +0100 From: Oleg Nesterov To: Mateusz Guzik Cc: brauner@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Eric W. Biederman" Subject: Re: [PATCH v2] exit: perform randomness and pid work without tasklist_lock Message-ID: <20250128192224.GD24845@redhat.com> References: <20250128160743.3142544-1-mjguzik@gmail.com> <20250128182932.GC24845@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D1AB840007 X-Stat-Signature: xujs7nxhcm7nnpuc54i8muagmpb8e9ca X-HE-Tag: 1738092181-127299 X-HE-Meta: U2FsdGVkX181JpIYMghJXUn33WMq05Is7bBaf99lnvuY/dIszELFMh60maqrnVf3kK++NS1z1rXwydXDkQPveZNbHRwd0/x5botnqCKVDVdGT7X676yfjZGXHBVzT1ysLZBkzZL+AZIElXIwP0wUw92Q0LJ5Zm56OIc1MVz6rIQHA55iKKClCrmDSe0WSUr9PIY7YdkmOwdaCl2o7Iw8L6hE/nIXbYl+jXyqY9kgBxVQoJ7FGn2HV9719QenHWqbl9lzNjQ5wnZ1WVZCu+ZYQO8XA9bkv490cju+dKvbGbeid99Y79y/MqhBpIT+LFmBW+09RVScQrUh3PwvCJetWIxCuqllZZZLdUQ6mPq859v+S7x04d1wkdeUCBT4NYdDHvUDRZtjw0SPE2P+eAeGwUqYMoNfD9MGaj2eqfOq7lk+VzxZqcLksSmB6ap4He1dniCUbFBFGuWqQ6/6ko3EPzOFgwHPRl30OP1FhudGzEbMWEMlRE/z2bNG9pDT8KOATa0MEvQleO+j+IM0LYEG3zs6nsTZXBtqZy5aWVOTMyhhN7vJKSC/7rAPzFoDTreIxdgiUMW+BQU+M/5PzYujA3iB0QldmRk6nng0oljaak9Gk7OgX2UKixGPxGVnsJhVlKjiIpChOTbGYAIwBc6eTE/7Od9NDmlitk9YkhRBrzo/r+miVIjQrPzoi2IqFNXm2C6bqeJnxyXVtQM7IGa4Ymwl6sTn66L3FDw3n5gqbk2+0L2eib6OVfurTMMR/xOCQ4YSXMSOBQGR/7KydEWDcfl24MO+Co92txaGcO/+qH7rmaQYs8cV5v+snQ4jnNBU9gr86S+PWgWjgSfeuww49VgmbkfPGMtSBh2OULmMSdoM4aFeuoEdytdOuDlLz4SX9ROhZzmePdpAW9qgSuk5xe4U96/xMpJhG6slavJpKmm+R6pME/t1F/oOGW/r3X5rEuZ1CZuHov/dY4+1nlY q9d3z0VK 7a6OcPSBrjr00XgOeR3q7oh5o/1B7x3jXj+ggMg3cuTbJHJ5nlqzKQQezt8v0IXbbPcig+G0z7w7R4a6UNTTkaDU76RqmGwMb/eiZS+zpT70+RFz33tkSjHJkZfB0p1Ke/hTAVMou087JPzNparU1LU1laBU3OosiUGrYlbeSFvNwdIBOIFxtD6uURdY2Iuo8COKhKk8urO2XWCd66IYCLqMlvFnBBlIROF8N0tyFFKyQ5UQBq6pUrI6zO5yEtSWFs5FVmFVnjPg92Jp08dQZ8Qil6n3jozOYDZGuEv05RwdDz3P984IvR+WuLrW8wqyC73Ql51Fe2UbwnzuBoJSUjtLVtYEXVZbSjTy+r1gA76JrXeU6yEmlArCWtd8rayziOk508rkQS29n2NLMJvzlArVfTQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.320714, 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 01/28, Mateusz Guzik wrote: > > On Tue, Jan 28, 2025 at 7:30 PM Oleg Nesterov wrote: > > > no problem, will send a v3 provided there are no issues reported > concerning the pid stuff Great, thanks. BTW, I didn't look at the pid stuff yet, I _feel_ that this can be simplified too, but I am already sleeping, most probably I am wrong. > > As for add_device_randomness(). I must have missed something, but I still can't > > understand why we can't simply shift add_device_randomness(p->sum_exec_runtime) > > to release_release_task() and avoid release_task_post->randomness. > > > > You said: > > > > I wanted to keep the load where it was > > > > but why??? Again, I must have missed something, but to me this simply adds the > > unnecessary complications. Either way, ->sum_exec_runtime is not stable even if > > task-to-release != current, so what is the point? > > > > Perhaps I should preface this is not a hill I'm going to die on. :-> > > This is the spot which is known to work and release_task does not > access the area otherwise. So for all I know someone will change it > later to be freeable, zeroed for "hardening" sum_exec_runtime can't be freed/zeroed/etc in any case. Again, please note that task-to-release can still be running, especially if it is current. > always add the same value. I don't think that "add the same value" does matter at all in this case, but please correct me. > So by default I don't want to change aspect. > > However, if you insist on the read to just moving, I'll be more than > happy to do that in v3. Thanks, see above ;) Oleg.