Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1370531 > unrolled thread

Re: Bloat caused by unnecessary calls to compound_head()?

Started by"Kirill A. Shutemov" <kirill@shutemov.name>
First post2016-04-04 12:40 +0200
Last post2016-04-04 12:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Bloat caused by unnecessary calls to compound_head()? "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-04-04 12:40 +0200

#1370531 — Re: Bloat caused by unnecessary calls to compound_head()?

From"Kirill A. Shutemov" <kirill@shutemov.name>
Date2016-04-04 12:40 +0200
SubjectRe: Bloat caused by unnecessary calls to compound_head()?
Message-ID<rka5k-1Fr-5@gated-at.bofh.it>
On Thu, Mar 31, 2016 at 08:33:29PM -0500, Eric Biggers wrote:
> On Sun, Mar 27, 2016 at 10:46:49PM +0300, Kirill A. Shutemov wrote:
> > The idea is to introduce new type to indicate head page --
> > 'struct head_page' -- it's compatible with struct page on memory layout,
> > but distinct from C point of view. compound_head() should return pointer
> > of that type. For the proof-of-concept I've introduced new helper --
> > compound_head_t().
> > 
> 
> Well, it's good for optimizing the specific case of mark_page_accessed().  I'm
> more worried about the general level of bloat, since the Page* macros are used
> in so many places.  And generating page-flags.h with a script is something to be
> avoided if at all possible.

I think it can be done without generating page-flags.h. We can generate
with preprocessor Head* helpers in addition to Page*. New heplers would
opperate with struct head_page rather than struct page.

> I wasn't following the discussion around the original page-flags patchset.  Can
> you point me to a discussion of the benefits of the page "policy" checks --- why
> are they suddenly needed when they weren't before?  Or any helpful comments in
> the code?

Recent THP refcounting rework (went into v4.5) made possible mapping part
of huge page with PTEs. Basically, we now have page table entries which
point to tail pages. It means we have tail pages in codepaths where we
haven't before and we need to deal with this.

Many of the flags apply to whole compound page, not a subpage. So we need
to redirect page flag operation to head page.

-- 
 Kirill A. Shutemov

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web