[PATCH] powerpc/pseries: explicitly reschedule during drmem_lmb list traversal

Nathan Lynch nathanl at linux.ibm.com
Tue Aug 11 06:03:43 AEST 2020


Michael Ellerman <mpe at ellerman.id.au> writes:
> One thought, which I possibly should not put in writing, is that we
> could use the alignment of the pointer as a poor man's substitute for a
> counter, eg:
>
> +static inline struct drmem_lmb *drmem_lmb_next(struct drmem_lmb *lmb)
> +{
> +	if (lmb % PAGE_SIZE == 0)
> +		cond_resched();
> +
> +	return ++lmb;
> +}
>
> I think the lmbs are allocated in a block, so I think that will work.
> Maybe PAGE_SIZE is not the right size to use, but you get the idea.
>
> Gross I know, but might be OK as short term solution?

OK, looking into this.


More information about the Linuxppc-dev mailing list