Re: [BUG] Swap xarray workingset eviction warning.

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

 



Hi Matthew,

On 2018/7/2 10:50, Matthew Wilcox wrote:
> On Sun, Jul 01, 2018 at 07:09:41PM -0400, Peter Geis wrote:
>> The warning is as follows:
>> [10409.408904] ------------[ cut here ]------------
>> [10409.408912] WARNING: CPU: 0 PID: 38 at ./include/linux/xarray.h:53
>> workingset_eviction+0x14c/0x154
> This is interesting.  Here's the code that leads to the warning:
> 
> static void *pack_shadow(int memcgid, pg_data_t *pgdat, unsigned long eviction)
> {
>         eviction >>= bucket_order;
>         eviction = (eviction << MEM_CGROUP_ID_SHIFT) | memcgid;
>         eviction = (eviction << NODES_SHIFT) | pgdat->node_id;
> 
>         return xa_mk_value(eviction);
> }
> 
> The warning itself comes from:
> 
> static inline void *xa_mk_value(unsigned long v)
> {
>         WARN_ON((long)v < 0);
>         return (void *)((v << 1) | 1);
> }

Sorry for breaking in, how do you think about considering

[RFC PATCH v4] <linux/tagptr.h>: Introduce tagged pointer
https://marc.info/?l=linux-kernel&m=153035209012070&w=2

to replace these masks? It seems boths for the XArray or old radix trees has many hacked code...

or if you think this implmentation is not ok, could you please give some suggestions or alternatives on tagptr...

> 
> The fact that we haven't seen this on other architectures makes me wonder
> if NODES_SHIFT or MEM_CGROUP_ID_SHIFT are messed up on Tegra?
> 
> Johannes, I wonder if you could help out here?  I'm not terribly familiar
> with this part of the workingset code.
Thanks,
Gao Xiang




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux