lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 27 Mar 2015 11:34:48 +0900
From:	Minchan Kim <minchan@...nel.org>
To:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:	akpm@...ux-foundation.org, sergey.senozhatsky@...il.com,
	ngupta@...are.org, sfr@...b.auug.org.au,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [withdrawn]
 zsmalloc-remove-extra-cond_resched-in-__zs_compact.patch removed from -mm
 tree

On Thu, Mar 26, 2015 at 05:13:13PM +0900, Sergey Senozhatsky wrote:
> On (03/26/15 16:39), Minchan Kim wrote:
> > Hello Sergey,
> > 
> > Sorry for slow response.
> > I am overwhelmed with too much to do. :(
> > 
> 
> Hello,
> sure, no problem.
> 
> > > > diff -puN mm/zsmalloc.c~zsmalloc-remove-extra-cond_resched-in-__zs_compact mm/zsmalloc.c
> > > > --- a/mm/zsmalloc.c~zsmalloc-remove-extra-cond_resched-in-__zs_compact
> > > > +++ a/mm/zsmalloc.c
> > > > @@ -1717,8 +1717,6 @@ static unsigned long __zs_compact(struct
> > > >  	struct page *dst_page = NULL;
> > > >  	unsigned long nr_total_migrated = 0;
> > > >  
> > > > -	cond_resched();
> > > > -
> > > >  	spin_lock(&class->lock);
> > > >  	while ((src_page = isolate_source_page(class))) {
> 
> > 
> > If we removed cond_resched out of outer loop(ie, your patch), we lose
> > the chance to reschedule if alloc_target_page fails(ie, there is no
> > zspage in ZS_ALMOST_FULL and ZS_ALMOST_EMPTY).
> 
> 
> in outer loop we have preemption enabled and unlocked class. wouldn't that help?
> (hm, UP system?)

It depends on preemption model. If you enable full preemption, you are right
but if you enable just voluntary preemption, cond_resched will help latency.

Thanks.

-- 
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ