Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1070637pxm; Wed, 23 Feb 2022 17:20:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAGmfi1wtQm+IOp/FX/ECf/11+VnyqV7iA61xd3fuHwYnkELhKChBd2UpiGOeqgp7qn7dJ X-Received: by 2002:a63:6a89:0:b0:362:8755:4210 with SMTP id f131-20020a636a89000000b0036287554210mr393758pgc.607.1645665643832; Wed, 23 Feb 2022 17:20:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645665643; cv=none; d=google.com; s=arc-20160816; b=I+MvrINg7P46plAjQO/dTmGttOmMz9KwNtXrkcHmecR+5FZAsTDv+t44X4tUVbxsLh KBeNi9p8fMQFkUWOsZsVrFQ9NDv6I/Zj0K3dZrpDVN4iUzPUZH6/x0xAdd8c5D7OWRQb uRauEVPmdePEQh4SE0TCkNXtWOJ0UN/Ymef/IkJxiw/nbMGeBb5WeKWBprptgr7clyl1 k6beiO3tkIZfp9sU4M2wxCReejakvBB92Bx8QwzkOqngKG/G9CNVPNggJKz+a/h3/iwb b4Ygs0ILEADSur9XJxM1AzCZF9l042sCRNMogu7NmKA7FyfbIlGW711JvHrXWoK9UsCw gJKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qIYUF+3jVKfFTL+7Zzg0lkEw8/+CNOAQvcnhArVHmLU=; b=CMGDvAcILnRwBjtJ+i8jBRPUhWjRcJsQOiypmMWmueZ3VrX5i/jyoUvFBvYVwnHxBX vobTrKZt1IR0r/jpBQARiUwIlMnDvw9v9qnJ5act2RDP53TQlaJWDgbMPV8pY7ksMUmh oHKH+hbgKsgQtDfsua5YcMFTjzpBykQNKR05uB+Ky0APyeHMwUZgxheqUJHy000rwVbN TkFyB3JaEOJoaCJQ5b79GiwRNBWizXbIxBpF/4sOCH6kEIAtLQbUe7VPOXH7VHUGGVUD ojXbC/xEyW9jiIFqcEMAKD5IyhUtCX/vwfrvm6xBTpKmVEgsNWB/sCOcIUMQCaylZYZW azeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B1IyE4CO; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p24si1042144plq.16.2022.02.23.17.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:20:43 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B1IyE4CO; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B1B219D74F; Wed, 23 Feb 2022 17:04:57 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243294AbiBWROQ (ORCPT + 99 others); Wed, 23 Feb 2022 12:14:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238693AbiBWROP (ORCPT ); Wed, 23 Feb 2022 12:14:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7934F33A; Wed, 23 Feb 2022 09:13:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 280C6B82116; Wed, 23 Feb 2022 17:13:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF1CFC340E7; Wed, 23 Feb 2022 17:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645636424; bh=Iuzpx3eqNgHmcbEjMXJ+Gh2uRHsMErcCOx9NX8k4XKA=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=B1IyE4COZCZ918sC6snIEXlQ37FWTy+lbsQm8/muHoyWU51r7G2vlkgwMfeeNkkJo LvuUWwWIgzsv0xOKdaQyFEZ5T9cwz0p3p2UmWne4sZvuIY1cz7nOzlDmpLM68zgaJf wXjsKpjrJaOJ0wTGW2ySYzcG2B1OZ4C41Rnt773LWclbltXWyufpzh5CuyF29C8Ly4 o4J2yRRP3b26m03bY+MlZ4y/Ns+5CMzG0cMBTodUAdptqggAuoPAV1RFipqqHELUCq v36YZRyzZKCJFamHLx+pcHWrmQOGNduvvo3l8sf8PSfT/8Y3ARBlwxl1MSbald+nmN R+VI6B8pEJxAA== From: SeongJae Park To: SeongJae Park Cc: Greg KH , akpm@linux-foundation.org, corbet@lwn.net, skhan@linuxfoundation.org, rientjes@google.com, xhao@linux.alibaba.com, linux-damon@amazon.com, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/12] mm/damon: Implement a minimal stub for sysfs-based DAMON interface Date: Wed, 23 Feb 2022 17:13:41 +0000 Message-Id: <20220223171341.29010-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220223164513.23089-1-sj@kernel.org> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Feb 2022 16:45:13 +0000 SeongJae Park wrote: > On Wed, 23 Feb 2022 17:09:38 +0100 Greg KH wrote: > > > On Wed, Feb 23, 2022 at 03:20:42PM +0000, SeongJae Park wrote: > > > +static struct kobj_attribute damon_sysfs_ul_range_min_attr = > > > + __ATTR(min, 0600, damon_sysfs_ul_range_min_show, > > > + damon_sysfs_ul_range_min_store); > > > + > > > +static struct kobj_attribute damon_sysfs_ul_range_max_attr = > > > + __ATTR(max, 0600, damon_sysfs_ul_range_max_show, > > > + damon_sysfs_ul_range_max_store); > > > > Can you use __ATTR_RW_MODE() instead here and elsewhere? > > Sure, I will, in the next revision. After thinking once more, I realized that it might not so simple. First of all, there are two files having same name in different directories (kdamonds//pid and targets//pid). The files work differently, so I need to use different _show/_store callbacks for them but __ATTR_RW_MODE() wouldn't support the case. Secondly, I'd like to keep the file names short because the meaning of the files can easily inferred from the hierarchy, but want to keep the _show/_store callback names to have prefixes that allows us easily know their meaning and usage even though it makes the name a little bit longer because I don't want to have too much source files for DAMON sysfs interface. Am I missing some of your point? Thanks, SJ [...]