Re: [PATCH 1/2] x86: Cleanup TIF value gaps in shift range

David Rientjes
2010-10-18T21:30:37Z

On Mon, 18 Oct 2010, Thomas Gleixner wrote:

> I agree in general, but this is stupid as hell. No fcking interface
> should exposed kernel internal flag bits just as hex values and no
> fcking luser space should rely on it to be a subject of no change.
>
> Seriously, if we can't even change TIF_* bits anymore then we are
> doing something wrong. That's a pure kernel internal affair and
> subject to change.
>

I agree, and when I added them to the show_state() dumps, I should have
probably enumerated the bits of interest to userspace and printed them
much like taint flags: use 'M' for my bit of interest, TIF_MEMDIE, which
gives access to memory reserves. We care a _lot_ about detecting hung
tasks that have that bit set because it usually indicates a VM problem
where we've allowed complete depletion of memory reserves. There's no
other way to detect that, so we need to export TIF_MEMDIE somehow and if
that's by doing (ti->flags & TIF_MEMDIE) ? "M" : "" then that's fine by
me. I hope we can do that before changing its value, though.