Introduce a new struct, namely damos_migrate_dest, for specifying
multiple DAMOS' migration destination nodes and their weights.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
include/linux/damon.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/linux/damon.h b/include/linux/damon.h
index bb58e36f019e..d60addd0b7c8 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -447,6 +447,22 @@ struct damos_access_pattern {
unsigned int max_age_region;
};
+/**
+ * struct damos_migrate_dest - Migration destination nodes and their weights.
+ * @node_id_arr: Array of migration destination node ids.
+ * @weight_arr: Array of migration weights for @node_id_arr.
+ * @nr_dests: Length of the @node_id_arr and @weight_arr arrays.
+ *
+ * @node_id_arr is an array of the ids of migration destination nodes.
+ * @weight_arr is an array of the weights for those. The weights in
+ * @weight_arr are for nodes in @node_id_arr of same array index.
+ */
+struct damos_migrate_dest {
+ unsigned int *node_id_arr;
+ unsigned int *weight_arr;
+ size_t nr_dests;
+};
+
/**
* struct damos - Represents a Data Access Monitoring-based Operation Scheme.
* @pattern: Access pattern of target regions.
--
2.39.5
On Sat, 21 Jun 2025 10:31:28 -0700 SeongJae Park <sj@kernel.org> wrote:
> Introduce a new struct, namely damos_migrate_dest, for specifying
> multiple DAMOS' migration destination nodes and their weights.
>
> Signed-off-by: SeongJae Park <sj@kernel.org>
> ---
> include/linux/damon.h | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/include/linux/damon.h b/include/linux/damon.h
> index bb58e36f019e..d60addd0b7c8 100644
> --- a/include/linux/damon.h
> +++ b/include/linux/damon.h
> @@ -447,6 +447,22 @@ struct damos_access_pattern {
> unsigned int max_age_region;
> };
>
> +/**
> + * struct damos_migrate_dest - Migration destination nodes and their weights.
Nit: Can this be renamed to damos_migrate_dests?
I think plural fits better because it stores a list of destinations.
Thanks,
Bijan
> + * @node_id_arr: Array of migration destination node ids.
> + * @weight_arr: Array of migration weights for @node_id_arr.
> + * @nr_dests: Length of the @node_id_arr and @weight_arr arrays.
> + *
> + * @node_id_arr is an array of the ids of migration destination nodes.
> + * @weight_arr is an array of the weights for those. The weights in
> + * @weight_arr are for nodes in @node_id_arr of same array index.
> + */
> +struct damos_migrate_dest {
> + unsigned int *node_id_arr;
> + unsigned int *weight_arr;
> + size_t nr_dests;
> +};
> +
> /**
> * struct damos - Represents a Data Access Monitoring-based Operation Scheme.
> * @pattern: Access pattern of target regions.
> --
> 2.39.5
On Tue, 1 Jul 2025 17:43:30 -0500 Bijan Tabatabai <bijan311@gmail.com> wrote:
> On Sat, 21 Jun 2025 10:31:28 -0700 SeongJae Park <sj@kernel.org> wrote:
>
> > Introduce a new struct, namely damos_migrate_dest, for specifying
> > multiple DAMOS' migration destination nodes and their weights.
> >
> > Signed-off-by: SeongJae Park <sj@kernel.org>
> > ---
> > include/linux/damon.h | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
> >
> > diff --git a/include/linux/damon.h b/include/linux/damon.h
> > index bb58e36f019e..d60addd0b7c8 100644
> > --- a/include/linux/damon.h
> > +++ b/include/linux/damon.h
> > @@ -447,6 +447,22 @@ struct damos_access_pattern {
> > unsigned int max_age_region;
> > };
> >
> > +/**
> > + * struct damos_migrate_dest - Migration destination nodes and their weights.
>
> Nit: Can this be renamed to damos_migrate_dests?
> I think plural fits better because it stores a list of destinations.
Makes sense, agreed. I guess you will do that on your own when you add this on
your patch series? Please let me know if you prefer different ways. I could
also do that and send it again as RFC v2 of this series.
Thanks,
SJ
[...]
On Tue, Jul 1, 2025 at 7:25 PM SeongJae Park <sj@kernel.org> wrote:
>
> On Tue, 1 Jul 2025 17:43:30 -0500 Bijan Tabatabai <bijan311@gmail.com> wrote:
>
> > On Sat, 21 Jun 2025 10:31:28 -0700 SeongJae Park <sj@kernel.org> wrote:
> >
> > > Introduce a new struct, namely damos_migrate_dest, for specifying
> > > multiple DAMOS' migration destination nodes and their weights.
> > >
> > > Signed-off-by: SeongJae Park <sj@kernel.org>
> > > ---
> > > include/linux/damon.h | 16 ++++++++++++++++
> > > 1 file changed, 16 insertions(+)
> > >
> > > diff --git a/include/linux/damon.h b/include/linux/damon.h
> > > index bb58e36f019e..d60addd0b7c8 100644
> > > --- a/include/linux/damon.h
> > > +++ b/include/linux/damon.h
> > > @@ -447,6 +447,22 @@ struct damos_access_pattern {
> > > unsigned int max_age_region;
> > > };
> > >
> > > +/**
> > > + * struct damos_migrate_dest - Migration destination nodes and their weights.
> >
> > Nit: Can this be renamed to damos_migrate_dests?
> > I think plural fits better because it stores a list of destinations.
>
> Makes sense, agreed. I guess you will do that on your own when you add this on
> your patch series? Please let me know if you prefer different ways. I could
> also do that and send it again as RFC v2 of this series.
I can do this in my patch series.
Would the best way for me to do that be to send modified versions of
this patch series with my patches, or should I send one additional
patch that just renames the struct with my patches?
Bijan
[...]
On Tue, 1 Jul 2025 20:43:46 -0500 Bijan Tabatabai <bijan311@gmail.com> wrote:
> On Tue, Jul 1, 2025 at 7:25 PM SeongJae Park <sj@kernel.org> wrote:
> >
> > On Tue, 1 Jul 2025 17:43:30 -0500 Bijan Tabatabai <bijan311@gmail.com> wrote:
> >
> > > On Sat, 21 Jun 2025 10:31:28 -0700 SeongJae Park <sj@kernel.org> wrote:
> > >
> > > > Introduce a new struct, namely damos_migrate_dest, for specifying
> > > > multiple DAMOS' migration destination nodes and their weights.
> > > >
> > > > Signed-off-by: SeongJae Park <sj@kernel.org>
> > > > ---
> > > > include/linux/damon.h | 16 ++++++++++++++++
> > > > 1 file changed, 16 insertions(+)
> > > >
> > > > diff --git a/include/linux/damon.h b/include/linux/damon.h
> > > > index bb58e36f019e..d60addd0b7c8 100644
> > > > --- a/include/linux/damon.h
> > > > +++ b/include/linux/damon.h
> > > > @@ -447,6 +447,22 @@ struct damos_access_pattern {
> > > > unsigned int max_age_region;
> > > > };
> > > >
> > > > +/**
> > > > + * struct damos_migrate_dest - Migration destination nodes and their weights.
> > >
> > > Nit: Can this be renamed to damos_migrate_dests?
> > > I think plural fits better because it stores a list of destinations.
> >
> > Makes sense, agreed. I guess you will do that on your own when you add this on
> > your patch series? Please let me know if you prefer different ways. I could
> > also do that and send it again as RFC v2 of this series.
>
> I can do this in my patch series.
Thank you!
> Would the best way for me to do that be to send modified versions of
> this patch series with my patches, or should I send one additional
> patch that just renames the struct with my patches?
I think the former (making modification in place of this patch) is better, for
people who will read the commit log in future. Please don't forget adding your
Singed-off-by: tag, and let me know if any help is needed!
Thanks,
SJ
[...]
© 2016 - 2026 Red Hat, Inc.