Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758273AbbDWU4x (ORCPT ); Thu, 23 Apr 2015 16:56:53 -0400 Received: from mail.skyhub.de ([78.46.96.112]:59002 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752174AbbDWU4w (ORCPT ); Thu, 23 Apr 2015 16:56:52 -0400 Date: Thu, 23 Apr 2015 22:56:40 +0200 From: Borislav Petkov To: Greg Kroah-Hartman Cc: "Eric W. Biederman" , Linus Torvalds , Andrew Morton , Arnd Bergmann , gnomes@lxorguk.ukuu.org.uk, teg@jklm.no, jkosina@suse.cz, luto@amacapital.net, linux-kernel@vger.kernel.org, daniel@zonque.org, dh.herrmann@gmail.com, tixxdz@opendz.org Subject: Re: [GIT PULL] kdbus for 4.1-rc1 Message-ID: <20150423205640.GR28327@pd.tnic> References: <20150413190350.GA9485@kroah.com> <8738434yjk.fsf@x220.int.ebiederm.org> <20150422085827.GA6962@pd.tnic> <20150423191433.GB13607@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150423191433.GB13607@kroah.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2781 Lines: 77 On Thu, Apr 23, 2015 at 09:14:33PM +0200, Greg Kroah-Hartman wrote: > I don't know what O(256) means here, O notation usually is used to > show the complexity of a function, so this really is almost always the > same amount of time, based on using the hash function. This is iterating over 256 hash buckets. So O(n) complexity. Better? > Yes, these looks like a lot of stuff but it's still really fast. "really fast" - that's the right way to quantify things, right? Let me reply in your terms: "no, it is dumb and slow". > And we need it. *Of* *course* you need it, what else. Lemme guess: there's no other way to do this than the way it was done now, right? And we should stop asking such stupid questions and accept it... Yeah, of course. > Hm, this seems to be to be O(1), pretty constant, we do the same amount > of work all the time. The same *pile* of unnecessary and needless work. You go and collect *all* that data on *every* packet send?! How many packets per second are we talking here? 100, 1000, 10000...? Let's say you're "really fast" because you've bought a "bigger machine" and do that information collection per packet for, say 10 microseconds (I'm probably too generous here but whatever). So at peak rates of 10000 packets per second, and 10µs preparation time per packet, you're wasting 100000 µs == 100 msec, i.e. 1/10th of a second you're busy only with sending packets. Hmm, but then the receiving side needs CPU time too... Oh yeah, and then those pesky userspace processes need some CPU time too... Are you really serious or is this some tactic of deliberately asking dumb questions? Let me know now so that I can stop wasting my time. > I don't understand what a token provides that is different from what is > happening here, please explain. How can that be faster than what we do > today? A token-based scheme would give you significantly less traffic; distributing those in sandboxing, containers, etc for free and you can throw the metadata collecting in the garbage can: Example: * A daemon issues a token, say, a capability to reboot. * It gives that token (with the kernel as intermediary) to a recipient which should be allowed to reboot. * recipient can drop privileges, run in a sandbox, whatever, it still has that token. That's exactly one packet sent *without* any information collection. Recipient has to authenticate itself to the kernel when requesting the packet. Clean and simple. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/