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.LFD.2.21.1801171535030.11282@casper.infradead.org>
Date:   Wed, 17 Jan 2018 15:35:14 +0000 (GMT)
From:   James Simmons <jsimmons@...radead.org>
To:     NeilBrown <neilb@...e.com>
cc:     Oleg Drokin <oleg.drokin@...el.com>,
        Andreas Dilger <andreas.dilger@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        lkml <linux-kernel@...r.kernel.org>,
        lustre <lustre-devel@...ts.lustre.org>
Subject: Re: [PATCH 15/19] staging: lustre: use explicit poll loop in
 ptlrpc_service_unlink_rqbd


> Rather an using l_wait_event(), use wait_event_idle_timeout()
> with an explicit loop so it is easier to see what is happening.

Reviewed-by: James Simmons <jsimmons@...radead.org>
 
> Signed-off-by: NeilBrown <neilb@...e.com>
> ---
>  drivers/staging/lustre/lustre/ptlrpc/service.c |   15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
> index 5c41297d23d2..6e3403417434 100644
> --- a/drivers/staging/lustre/lustre/ptlrpc/service.c
> +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
> @@ -2618,7 +2618,7 @@ ptlrpc_service_unlink_rqbd(struct ptlrpc_service *svc)
>  {
>  	struct ptlrpc_service_part *svcpt;
>  	struct ptlrpc_request_buffer_desc *rqbd;
> -	struct l_wait_info lwi;
> +	int cnt;
>  	int rc;
>  	int i;
>  
> @@ -2658,12 +2658,13 @@ ptlrpc_service_unlink_rqbd(struct ptlrpc_service *svc)
>  			 * the HUGE timeout lets us CWARN for visibility
>  			 * of sluggish LNDs
>  			 */
> -			lwi = LWI_TIMEOUT_INTERVAL(
> -					LONG_UNLINK * HZ,
> -					HZ, NULL, NULL);
> -			rc = l_wait_event(svcpt->scp_waitq,
> -					  svcpt->scp_nrqbds_posted == 0, &lwi);
> -			if (rc == -ETIMEDOUT) {
> +			cnt = 0;
> +			while (cnt < LONG_UNLINK &&
> +			       (rc = wait_event_idle_timeout(svcpt->scp_waitq,
> +							     svcpt->scp_nrqbds_posted == 0,
> +							     HZ)) == 0)
> +				cnt ++;
> +			if (rc == 0) {
>  				CWARN("Service %s waiting for request buffers\n",
>  				      svcpt->scp_service->srv_name);
>  			}
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ