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 18429C25B74 for ; Sun, 2 Jun 2024 15:56:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7D7C26B00A3; Sun, 2 Jun 2024 11:56:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 760BA6B00A4; Sun, 2 Jun 2024 11:56:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6013B6B00A5; Sun, 2 Jun 2024 11:56:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 3E6746B00A3 for ; Sun, 2 Jun 2024 11:56:19 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B4DAD160256 for ; Sun, 2 Jun 2024 15:56:18 +0000 (UTC) X-FDA: 82186400436.11.1243DF2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id 131DE140002 for ; Sun, 2 Jun 2024 15:56:16 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="GHHH/F8E"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717343777; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rE4MKZ0RrsLsf5Uno/P9IZpYRt5gxGfrDsYb7pVd7kw=; b=JYRUK3GgbYbbbHR6KZqqNTeO/9o2nYHdFuvJtj9DUaTJHbI3qZkn5175UFr1hKVoVorrpK eup5dd3rcZUhzsrJ20/tYGFXidYqnwOzsspNUElgvrTPKEVFZzw/A3B6lR3MhI8u2ff4iA +jWVMy4D2gAVyqGeEE5h3Zvbvu1knQ0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717343777; a=rsa-sha256; cv=none; b=ARamiLQJZV0FcwbtZpu0fb1rAKXUeUxQBJuODns7KaDWVUe5P7SZpOliEB0aNpdnr8zAs/ pZYRatd/yuypZL7MwvfDyq+ad06d6lvP1zrKr4PPN926Fk5ERSzjfs8FZrIiBo+ZGxWO02 zYhnlzrY0/lqMlTyMs3UwR1bSalG97c= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="GHHH/F8E"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1B29760B59; Sun, 2 Jun 2024 15:56:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B9F6C2BBFC; Sun, 2 Jun 2024 15:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717343775; bh=l8+GXFRaLRqbnJKvA06bKbF87+GahGFEyqWYIo+UKmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GHHH/F8EXYJMsAai0VU+CJMTOUNXqZIau8RCzKJctcAEnyH8MyrsvvKNy7kbpNnSH icwF4JZIw7Ll17LUc4B50WQQIawFqsr2ovJwN2+WtJgGNXGna3XJM2Dc6G/wOzotti FU5FcEY4qVC0LfQzcx3NxIMx20LDMWvRGtLQvaTYt20QdcxkXBRYbDo+dNTY+u0XjG v+x3FXaFps7m7UayW0HUucDDobSfC6ePU+0miVu7imnOeRPwLfSeRE0j2PSiqvwpgM s65+0gqM4555/QinXnWeFQTWxDeoU9Cux2wXDgR5aTUkx0Ob9bftYM9fYStKAPKebO LoKsqlyjI+Qfg== From: SeongJae Park To: Alex Rusuf Cc: SeongJae Park , damon@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 0/2] DAMON multiple contexts support Date: Sun, 2 Jun 2024 08:56:12 -0700 Message-Id: <20240602155612.91435-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240602153102.926789-1-yorha.op@gmail.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: y4993n3yngmknntm4qcawhotiwauion5 X-Rspamd-Queue-Id: 131DE140002 X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1717343776-237120 X-HE-Meta: U2FsdGVkX1+X/cW3LjMOlsCKL5CfiLMn/z5cf88iGryTBhvesbaI5AMmQvUuMZ6fijR/yF3Fck9HMb8gOAzpGH8XgiqS/WOjwmID1aKLjTUS0ob49QweMUI2/3T+Z+yyJuE3n814yuFvDUxWEsa/ip34hUeqdujXdMk93OTfNgvyQQfjMMJGlrmkfwcEPzjX3Av4sF8ATMBWMrLXoT2FAI4wR0KjiQgL/DmZvhQ/n8thyG3ZaynJveHkH91QQEGpuwCIznIErzXJ+Y4bBzYJPJSbGSEn/HvP8MsnY5JXdeP8uhhMCRlI64jv0lvozxdFjAYBWqrj92LLQe6oTDh0N8TyORTRmfIz5DqswD3mQKRQvNJ1Oe4teU0QFk5/wig9+DfRTaJhf6gqvIAZEIAOOjHPvW9Speszc7QNnr2AU19BB7GDyoIllaw8K1MZZSfsR5/k0jPk871DJABw182uDulC2O7guRWr/OM4KOmVUUze86TD6fuW/Xz5Mf1jcintXz+Ai7Klc0h5/El9a2uqJb1eEuTynpUzDAG7v84hFLY9bu33RG8h5uj3cNATtO1KSfDLuEo1c3SCmlm9MplCpQNTW73vNxBY5ZJBCprEtzq4SPXmu1Sq09/I9rZX2fvn8fjwmVZbW6IcCqm3Bgjq6yEvKEmksWYwO3oy13UFPjBtFPTtxj11ep9mxXBqstLpXzbOY8Adj4JfhflIUYbRi0kMZ9m+8kxQXmwfbnbYbT6U7wFz7w2FkMnwg3QfO07QYnCeZSwXUFUsrYZaNgXiFbQv689cHQPtWmDSRMsGKSDmMwqqOjRQwxAR4hD/qgo1fJAJoU7/rBzuV42WuiCOPk3S1WX6OaAOPLtQpf0DGAVZi+4iBQSX/c/yh7qqHlz1VAwlsvLyfwYGh+sqVVnZYt0PqOzVigYtKOpQHJl8PM0sEHSBIw49L/YS1/wEbYxv7/KwECxWry1dIRczHy4 KKNGG1PR 9rFc8PsIqClFqWSz4LeS7Ew+cYJja8uTH8fM3FPgWEVWIbCXx5KFJYmOZNNZ2d7MC0/IvBS7mbCNivZ/5oUiSXgypj1cbkrhoA38YiNYeoTj2Yky4kIdRa2KOO4KS3RH0ZlHLfPo++4i7iBdxKMEDq+OpOEGwbsb9Jhpwh//xP7BBVdg407k+D2CTWfK/5Kav25KCX90j/ivdMx4uqVcIxgQD1DRln0cetJni5BH24rsDca1wNdRgV/AJNJL6+CWQ5EmhBP9YFI781yaCfQLQdB6nLHa6r0eww2z9NU4gISq4ycX7Yx0COcijQ3WFecjuv6IQdGrntsLZBkg= 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 Sun, 2 Jun 2024 18:31:02 +0300 Alex Rusuf wrote: > Hi SJ, > > > Hello Alex, > > > > On Fri, 31 May 2024 15:23:18 +0300 Alex Rusuf wrote: > > > > > Currently kdamond uses only one context per kthread > > > and most of its time it sleeps, so utilizing several > > > contexts can scale kdamond and allow it to use > > > another set of operations. > > > > > > This patch-set implements support for multiple contexts > > > per kdamond. > > > > > [...] > > > > > > --- > > > Changes from v1 (https://lore.kernel.org/damon/20240515152457.603724-1-yorha.op@gmail.com/) > > > - Compatibility for DebugFS interface is kept > > > - Kunit tests build/execution issues are fixed > > > - Patches from v1 are sqaushed, so that consistency between patches is > > > kept > > > > My request was to avoid unnecessary temporal changes that will be removed in > > next patches. Some of those are well removed in this version, but I still show > > some. E.g., nr_contexts field. Also, this resulted in two big patches. > > This makes sense and I actually wanted that as well, so I tried to separate > them in previous version, looks like I misunderstood your request. No problem, I think I should also be more clear about the point. Happy to have a chance to develop my humble communication skill with the conversaions with you. > > Anyway, don't you mind if lru_sort/traceevents/etc. will not function > correctly without applying the whole patch-set? I mean if we use the > approach below, once core.c is modified at least lru_sort and reclaim > will not work correctly, they even will not be built. I mind those. Everything should work without regression in the middle of the patchset. Nonetheless, we should avoid only regression. We don't need to make everything perfect. Let's minimize changes to the other modules in the way. I believe below suggested patches flow and my second reply to the second patch of this patchset can clarify the point. Please let me know if not. > > > > > I'd also appreciate if you can separate changes into smaller ones of logical > > single change. For example, changes for lru_sort.c, reclaim.c, and sysfs.c on > > first patch could be much smaller in my opinion. Traceevent change can also be > > separated from patch 2. Some of multi-context support seems mixed in patch 1. > > > > I'd suggest below patches flow. > > > > Patch 1: Introduce new struct and control functions for the struct. Don't > > really use the struct and the functions. > > > > Patch 2: Modify core.c to use the struct and implement multiple contexts > > support. Minimize changes to core.c users. Just keep those work as before. > > Don't implement multi contexts support on sysfs.c or trace events at this > > point. > > > > Patch 3: Update sysfs.c to support the multiple contexts. > > > > Patch 4: Update trace events to better support it. As I mentioned on my second reply to the second patch, you could swich patches 3 and 4 if you want trace events to work perfect from the beginning of user-visible multi contexts support. Thanks, SJ [...]