Received: by 10.213.65.68 with SMTP id h4csp2022254imn; Sun, 1 Apr 2018 22:30:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx497GTXh+1OYEHOp4Em7Knxr57wnUlCUh2SnzwqLzr4wb88mIW4ava4eBLseTXpf3dnpzdQ5 X-Received: by 2002:a17:902:a612:: with SMTP id u18-v6mr8579004plq.10.1522647051625; Sun, 01 Apr 2018 22:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522647051; cv=none; d=google.com; s=arc-20160816; b=tBmrYGhy/tibH6t6dTrIpBZm7v7CdZLg6+QGcXXtyrBh9d9080yCyRwKgx3re1O666 jwMyJg91XIqBN67XTqiDpYx48H3buYV58mToSjqlziXRTNhTxS0jvzi0Gq6qitpQCs+O sWIWGp5eGkAtFKny7BeycZE9BBVrLBtWAPHPiOqwjM2egTYLQJ5xLpdRL4ppGTNg0XRe eYHNhHVtCufiSn0xH643/lEQGWuD3xo+ArR/hsuVCOxCBXmpWHhgvneNt6WcYLDIM18C ed3YWD4+/DSfIYJgc8EcT3A84bw9SZqDPkVEYVTprEknYQ8autMDhwZt+EnYfnx64oX/ BSSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=1ytG1qP5Q01vEMkCYsBCTMy58hn3jAyCvq01V8WMm9A=; b=iCYiWCuJ7pmZFcNGTHhUukj6i3TDuW+v/YkNuXsDYthx3XAmdb3sr4U5ThUcEJDKhU Q/vLueF4lWrn3Eo0qDPFIzvQYZwxzWjrObJfN+GYK6C1/USqItDHNaeHTtq5D8zQMqdm YTAOVAq9cWJcY7G7mh/yKo1F9wldNEACCysZfgW9soA6i3TFhofE/h8U877pu+yugVX+ lDyrAg4urM34MAyKDUk9Zix2eUNTp+fzHr+eWv4uUOXwP88swg+fGqFz5+OeGZKD0986 FmK8QCz+958KEgdzdvVUG8DAH73L9Y7tAAq4wiHIrw7lDgGPPKGaBPq+z7moRiFc9uf7 GWhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g47e7YNo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t14-v6si1877299ply.336.2018.04.01.22.30.38; Sun, 01 Apr 2018 22:30:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g47e7YNo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752198AbeDBF30 (ORCPT + 99 others); Mon, 2 Apr 2018 01:29:26 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:45679 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbeDBF3Z (ORCPT ); Mon, 2 Apr 2018 01:29:25 -0400 Received: by mail-pf0-f169.google.com with SMTP id l27so8832835pfk.12; Sun, 01 Apr 2018 22:29:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=1ytG1qP5Q01vEMkCYsBCTMy58hn3jAyCvq01V8WMm9A=; b=g47e7YNo+sdcwRpwgC4xGjNJRhqVcS34+tEYFyoKu4g9H8Vi234xErKF/0OLCGwYqL 0scHkLKEH2t0n9jNPVGk/YozzrtVW8V2fXCJG0n1+Rd3nKhO3yrHYZoay3Ehq+9+otFV N+4EFdCVsx+X6bppD9zqp11eJjV24V+QXd7mEOHPA44hKabx31snbfFBMiLeTD70w4ep CIhMLHtOjfKoQb9Ve0++VXEaIBQPUDTB2SEhW/juGxLEZfvIiDn475G4eyOK+xkARnj1 hc16a0L2GPOkFSBVxIOGZ6B8kASZYf4ASm5jbnygqiUl82HBnuWYF8WhkiRmNUpJxpU2 JGcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=1ytG1qP5Q01vEMkCYsBCTMy58hn3jAyCvq01V8WMm9A=; b=d6vocKb1RcRcWtAoWRfYOyar25GR5Em/QkC047qQzP6CzS/1+jpzARLe5Q1b0iEeYa 8cPuHbqp0VevWnJXwh1Mfe5MqP+COyLDzO9ogFGQ7pYRIZS54H49hlPx3HbQVn6XduzP MTaS5qalWB/+al4rFomln41q+sApgO701n7IoIZAPh/9tjdY/QeRsc4cFCR70rS6hHca btCHeSok7HuHbuFGjtBw5jWCDbCB+gZcIzm+hd8edplZdUdAWT7v6fhQnQxvJ5CcI8Ba GhgTbwLXvK4a3uIj6cVs8991ratEm/Kw0qRZA53UzQDwQCH2Uv+E9Y1rcdzQ9H3wuora Co1A== X-Gm-Message-State: AElRT7F4atZSw+3sYx+kRve+BFmmuMYEKoeIs+HIWUz42vHVfofw3Fej u6kgj40hHEHQJhIXH1Um20fVRNMh X-Received: by 10.99.120.3 with SMTP id t3mr5351305pgc.56.1522646964475; Sun, 01 Apr 2018 22:29:24 -0700 (PDT) Received: from localhost ([175.223.19.139]) by smtp.gmail.com with ESMTPSA id e3sm4703574pgr.80.2018.04.01.22.29.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Apr 2018 22:29:23 -0700 (PDT) Date: Mon, 2 Apr 2018 14:29:20 +0900 From: Sergey Senozhatsky To: wen.yang99@zte.com.cn Cc: yanaijie@huawei.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Bart.VanAssche@wdc.com, pmladek@suse.com, sergey.senozhatsky.work@gmail.com, tj@kernel.org, jiang.biao2@zte.com.cn, zhong.weidong@zte.com.cn, tan.hu@zte.com.cn Subject: Re: =?utf-8?B?562U5aSNOiBSZTogW1BBVENIIHYy?= =?utf-8?Q?=5D_scsi=3A_Introduc?= =?utf-8?Q?e?= sdev_printk_ratelimited to throttlefrequent printk Message-ID: <20180402052920.GF3795@jagdpanzerIV> References: <5AC1976F.1040801@huawei.com> <201804021314481872986@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201804021314481872986@zte.com.cn> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (04/02/18 13:14), wen.yang99@zte.com.cn wrote: > > > It's true that this print for the same device is useless. But it's > > useful for different devices. Is it possible to limit the print only > > for the same device? > > In our scene, it's ?just for the same device (q->queuedata), Thanks. Yes, what Jason meant was that rate limit struct is shared by different call sites - including scsi_request_fn() from different devices. If device1->scsi_request_fn()->sdev_printk_ratelimited() causes printk rate limit, then messages from device2->scsi_request_fn()->sdev_printk_ratelimited() may be lost entirely, unless you have enough of them. -ss