From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755386AbYEEFSn (ORCPT ); Mon, 5 May 2008 01:18:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752921AbYEEFSc (ORCPT ); Mon, 5 May 2008 01:18:32 -0400 Received: from yw-out-2324.google.com ([74.125.46.29]:42314 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752206AbYEEFSb (ORCPT ); Mon, 5 May 2008 01:18:31 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tN3vD8a8m6NPqvkJJoJxU0FZ5xbZyhMqHvN4vdGBdrXnmkBmyZ2K9RRfjQvgmXQ2QpWXh+D4TYjItjuBlgfMY0pqLcFHIIiZO/ib0D7VPqY+DCpmxAilASyHbYIxyHyC0qDpPKQq48TABiFwLrmtbUr2X/xmhoaGdhnKY2TBINY= Message-ID: Date: Mon, 5 May 2008 13:18:30 +0800 From: "Dave Young" To: "Joe Perches" Subject: Re: [PATCH -mm] __ratelimit rewrite Cc: akpm@linux-foundation.org, paulmck@us.ibm.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David Miller" In-Reply-To: <1209955974.13011.10.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080504070738.GA11832@darkstar.te-china.tietoenator.com> <1209912447.16966.42.camel@localhost> <1209954305.13011.1.camel@localhost> <1209955974.13011.10.camel@localhost> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 5, 2008 at 10:52 AM, Joe Perches wrote: > > On Mon, 2008-05-05 at 10:58 +0800, Dave Young wrote: > > On Mon, May 5, 2008 at 10:25 AM, Joe Perches wrote: > > > On Mon, 2008-05-05 at 09:37 +0800, Dave Young wrote: > > > > > I think your changes should then be done in > > > > > printk.h not creating a new ratelimit.h. > > > > IMO ratelimit is not just for printk use now, so a standalone head > > > > file is necessary. > > > What other uses would ratelimit have? > > ratelimit is a general function, another user of it is > > WARN_ON_RATELIMIT in this patch. It could have other usage in future. > > You put WARN_ON_RATELIMIT in bug.h right? > WARN_ON in bug.h is a printk Yes, warn is indeed printk, but it's not equal to printk. > > printk.h should #include > kernel.h should not include that file. > > What non print related function could be served by ratelimit? You can do some other handling except printk in ratelimit logic. After searching the code, I guess DCCP-Sync ratelimit can use this feature. David, am I right? BTW, most of printk_ratelimit users should use their own ratelimit_state, maybe I should do the replace work as a patch series.