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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140529103905.GQ8554@dastard>
Date:	Thu, 29 May 2014 20:39:05 +1000
From:	Dave Chinner <david@...morbit.com>
To:	Minchan Kim <minchan@...nel.org>
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jens Axboe <axboe@...nel.dk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-mm <linux-mm@...ck.org>, "H. Peter Anvin" <hpa@...or.com>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Hugh Dickins <hughd@...gle.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Dave Hansen <dave.hansen@...el.com>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: virtio ring cleanups, which save stack on older gcc

On Thu, May 29, 2014 at 04:41:17PM +0900, Minchan Kim wrote:
> Hello Rusty,
> 
> On Thu, May 29, 2014 at 04:56:41PM +0930, Rusty Russell wrote:
> > They don't make much difference: the easier fix is use gcc 4.8
> > which drops stack required across virtio block's virtio_queue_rq
> > down to that kmalloc in virtio_ring from 528 to 392 bytes.
> > 
> > Still, these (*lightly tested*) patches reduce to 432 bytes,
> > even for gcc 4.6.4.  Posted here FYI.
> 
> I am testing with below which was hack for Dave's idea so don't have
> a machine to test your patches until tomorrow.
> So, I will queue your patches into testing machine tomorrow morning.
> 
> Thanks!
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index f5c6635b806c..95f169e85dbe 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -4241,10 +4241,13 @@ EXPORT_SYMBOL_GPL(yield_to);
>  void __sched io_schedule(void)
>  {
>  	struct rq *rq = raw_rq();
> +	struct blk_plug *plug = current->plug;
>  
>  	delayacct_blkio_start();
>  	atomic_inc(&rq->nr_iowait);
> -	blk_flush_plug(current);
> +	if (plug)
> +		blk_flush_plug_list(plug, true);
> +

Could simply be

-	blk_flush_plug(current);
+	blk_schedule_flush_plug(current);

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
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