Re: [PATCH v2 3/3] mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for weighted interleaving

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 22, 2024 at 11:54:34PM -0500, Gregory Price wrote:
> > 
> > Can the above code be simplified as something like below?
> > 
> >         resume_node = prev_node;
---         resume_weight = 0;
+++         resume_weight = weights[node];
> >         for (...) {
> >                 ...
> >         }
> > 
> 
> I'll take another look at it, but this logic is annoying because of the
> corner case:  me->il_prev can be NUMA_NO_NODE or an actual numa node.
> 

After a quick look, as long as no one objects to (me->il_prev) remaining
NUMA_NO_NODE while having a weight assigned to pol->wil.cur_weight, then
this looks like it can be simplified as above.

I don't think it's harmful, but i'll have to take a quick look at what
happens on rebind to make sure we don't have a stale weight.

~Gregory




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux