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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1809042351220.1416@nanos.tec.linutronix.de>
Date:   Tue, 4 Sep 2018 23:54:59 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     subhra mazumdar <subhra.mazumdar@...cle.com>
cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        dhaval.giani@...cle.com, steven.sistare@...cle.com
Subject: Re: [RFC PATCH 2/2] pipe: use pipe busy wait

On Thu, 30 Aug 2018, subhra mazumdar wrote:
>  
> +void pipe_busy_wait(struct pipe_inode_info *pipe)
> +{
> +	unsigned long wait_flag = pipe->pipe_wait_flag;
> +	unsigned long start_time = pipe_busy_loop_current_time();
> +
> +	pipe_unlock(pipe);
> +	preempt_disable();
> +	for (;;) {
> +		if (pipe->pipe_wait_flag > wait_flag) {
> +			preempt_enable();
> +			pipe_lock(pipe);
> +			return;
> +		}
> +		if (pipe_busy_loop_timeout(pipe, start_time))
> +			break;
> +		cpu_relax();
> +	}
> +	preempt_enable();

You are not really serious about busy looping with preemption disabled?

That's just wrong. Why do you want to block others from getting on the CPU
if there is nothing in the pipe?

There is no point in doing so, really. If the wait loop is preempted
because there is more important work to do, then it will come back and
either see new data, or leave due to wait time reached.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ