Re: [PATCH] mm/swapfile: fix swapoff vs. software dirty bits

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

 



On Fri, 18 Sep 2015 23:21:09 +0300
Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote:

> On Fri, Sep 18, 2015 at 11:10:38AM +0200, Martin Schwidefsky wrote:
> > > 
> > > You know, these are only two lines where we use _PAGE_SOFT_DIRTY
> > > directly, so I don't see much point in adding 22 lines of code
> > > for that. Maybe we can leave it as is?
> >  
> > Only x86 has pte_clear_flags. And the two lines require that there is exactly
> > one bit in the PTE for soft-dirty. An alternative encoding will not be allowed.
> 
> Agreed, still I would defer until there is a real need for an alternative encoding.

The s390 support for soft dirty ptes will need it.
 
> > And the current set of primitives is asymmetric, there are functions to query
> > and set the bit pte_soft_dirty and pte_mksoft_dirty but no function to clear
> > the bit.
> 
> Yes, but again I don't see an urgent need for these helpers.
> 
> Anyway, there is no strong objections against this approach
> from my side, but please at least compile-test the patch next
> time, because this is definitely a typo
> 
> static inline pmd_t pmd_clear_soft_dirty(pmd_t pmd)
> {
> 	return pmp_clear_flags(pmd, _PAGE_SOFT_DIRTY);
> }
> 
> I bet you meant pmd_clear_flags.

Yes, the final test is still pending. The patch was more or less for illustrative
purpose. I yet have to do the compile & boot test on an x86 system.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



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