lkml.org 
[lkml]   [2018]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Zram writeback feature unstable with heavy swap utilization - BUG: Bad page state in process...
On Wed, Jul 25, 2018 at 11:51:06AM +0900, Minchan Kim wrote:
> On Tue, Jul 24, 2018 at 07:35:32PM -0700, Matthew Wilcox wrote:
> > There is NOTHING in a union with _refcount.
>
> Confusing. Matthew, what am I missing?
>
> Before:
>
> counters consumes 8 bytes
> units and _refcount consumes each 4 bytes so memory space is not overlapped.

Correct. _mapcount is at offset 24, as is units. _refcount is at offset 28.

> union {
> unsigned long counters;
> struct {
> union {
> atomic_t _mapcount;
> int units; /* SLOB */
> };
> atomic_t _refcount;
> };
> };
>
>
> After:
>
> Now, units is overlapped with _refcount and _mapcount.

No. units is at offset 24, as is _mapcount. But _refcount is still at
offset 28.

> union {
> unsigned long counters;
> int units; /* SLOB */
> struct { /* Page cache */
> atomic_t _mapcount;
> atomic_t _refcount;
> };
> };

\
 
 \ /
  Last update: 2018-07-25 04:56    [W:0.159 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site