From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754174AbeDBGIQ (ORCPT ); Mon, 2 Apr 2018 02:08:16 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6717 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751639AbeDBGIP (ORCPT ); Mon, 2 Apr 2018 02:08:15 -0400 Subject: =?UTF-8?Q?Re:_=e7=ad=94=e5=a4=8d:_Re:_[PATCH_v2]_scsi:_Introduce_sd?= =?UTF-8?Q?ev=5fprintk=5fratelimited_to_throttlefrequent_printk?= To: Sergey Senozhatsky , References: <5AC1976F.1040801@huawei.com> <201804021314481872986@zte.com.cn> <20180402052920.GF3795@jagdpanzerIV> CC: , , , , , , , , , From: Jason Yan Message-ID: <5AC1C8BF.1030503@huawei.com> Date: Mon, 2 Apr 2018 14:07:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20180402052920.GF3795@jagdpanzerIV> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.96.203] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/4/2 13:29, Sergey Senozhatsky wrote: > 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 > Yes, that's exactly what I mean. Thanks, Jason > . >