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: <20180313201039.GB4082@hirez.programming.kicks-ass.net>
Date:   Tue, 13 Mar 2018 21:10:39 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     linux-rt-users <linux-rt-users@...r.kernel.org>,
        Corey Minyard <cminyard@...sta.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Steven Rostedt <rostedt@...dmis.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Tejun Heo <tj@...nel.org>
Subject: Re: [RT PATCH 2/2] block: blk-mq: move
 blk_queue_usage_counter_release() into process context

On Tue, Mar 13, 2018 at 07:42:41PM +0100, Sebastian Andrzej Siewior wrote:
> +static void blk_queue_usage_counter_release_swork(struct swork_event *sev)
> +{
> +	struct request_queue *q =
> +		container_of(sev, struct request_queue, mq_pcpu_wake);
> +
> +	wake_up_all(&q->mq_freeze_wq);
> +}
> +
>  static void blk_queue_usage_counter_release(struct percpu_ref *ref)
>  {
>  	struct request_queue *q =
>  		container_of(ref, struct request_queue, q_usage_counter);
>  
> -	wake_up_all(&q->mq_freeze_wq);
> +	swork_queue(&q->mq_pcpu_wake);
>  }

Depending on if we expect there to actually be wakeups, you could do
something like:

	if (wq_has_sleepers(&q->mq_freeze_wq))
		swork_queue(&q->mq_pcpu_wake));

avoiding the whole workqueue thing in the case there wasn't anybody
waiting for it. But since I don't know this code, I can't say if it
makes sense or not. Tejun?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ