From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 4C1F51D61B1 for ; Tue, 28 Jan 2025 19:23:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738092185; cv=none; b=pYEmK45BNLZWiRhEHpRC+FbxP9ZJ0UpvgZrsfq6ZvVqFiKzP0uOTuPqDiOWpKIVdMCFpoekjxTeovbYHgZAm4ThCJcdX1qJKhFyXAEaqEfksNARFwMyjgsa+sFeWX7QR9OgzX3/wiKoTMVSvT0g00eTqRtaUD5t5cf3v+a3rZeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738092185; c=relaxed/simple; bh=Trr+0yyLOh+keVKZl7MbCgYjNVpCehLuNqkR1WuopSE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bX7yfJPOaqDmLOeO3T2bqflLPSTyISHGEtBCYnR/G3bWK0qXdUiso0aT3w1ghwV5DbbQmaIAlknkzt9syvi/QqeJIxKKzHGvjRag3k2t7/PAEDVEQG6PYUHU/3RXiNH9GaIW+UaIKABdSQqA1NTXfbZ5T8umBO4fUEkTzJLbKeE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=BfMzYMdf; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BfMzYMdf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738092183; 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=BfMzYMdfh9AjGDfkxxMGyNVyropViL7BioIh6bU9NpBjFQ4M8qgSNkq7YSMGdbiJLsy92r BcdMuSVB2LIA90PFYkFi4xFfbxtl+HVMp9A8VJeQoqdeVO9DGowHBjtHg7lVE+Kyq7cf2E 7sXdLunoBCwtd+ja94VZP/fY09VsDdU= 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> 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=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 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.