Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757721AbaDWQBg (ORCPT ); Wed, 23 Apr 2014 12:01:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5949 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757475AbaDWQB1 (ORCPT ); Wed, 23 Apr 2014 12:01:27 -0400 Date: Wed, 23 Apr 2014 12:01:06 -0400 From: Vivek Goyal To: Andy Lutomirski Cc: Simo Sorce , Daniel J Walsh , David Miller , Tejun Heo , "linux-kernel@vger.kernel.org" , lpoetter@redhat.com, cgroups@vger.kernel.org, kay@redhat.com, Network Development Subject: Re: [PATCH 2/2] net: Implement SO_PASSCGROUP to enable passing cgroup path Message-ID: <20140423160106.GB24651@redhat.com> References: <1397759013.2628.86.camel@willson.li.ssimo.org> <20140417185023.GA32527@redhat.com> <1397761817.2628.113.camel@willson.li.ssimo.org> <20140417191646.GA2461@redhat.com> <20140421150307.GA4367@redhat.com> <20140423150744.GC22755@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 23, 2014 at 08:37:56AM -0700, Andy Lutomirski wrote: > On Wed, Apr 23, 2014 at 8:07 AM, Vivek Goyal wrote: > > On Mon, Apr 21, 2014 at 08:47:51AM -0700, Andy Lutomirski wrote: > > > > [..] > >> To summarize from my reading of how this crap words: > >> > >> When a unit is created, systemd opens a stream socket pointing at > >> /run/systemd/journal/stdout. It tells journald the unit, along with > >> lots of other useful information. journald records this association > >> between the socket and the unit. Systemd could tell journald the > >> cgroup here, too, if it wanted it. > > > > Ok, that's a fair point. I looked at connect_logger_as() and I see > > that systemd does connect() on behalf of service being launched and > > sets up fd and passes bunch of information to journald. So cgroup could > > be one of the information and that would act like SO_PEERCGROUP in > > this specific case. Not sure why it is not done though. I will let > > systemd folks comment on that. I don't have enough background here. > > > > But this works in this specific case where there is a mechanism to > > pass meta information to receiver. What about SSSD use case where > > they want to know the cgroup of client and possibly provide differentiated > > service based on client. > > Separate sockets sounds like it will work just fine, if not better, here, to me. That's one way of doing it. But that can't be the argument to not provide another way of doing same thing with the help of single socket instead of maintaining multiple ones. Setting up separate socket for each client will require knowing every client in advance so that one can socket appropriately. But mutiplexing everything on one socket, does not have that constraint and should make life little bit easier. I think they will be just two different ways of doing things and user can choose one depending on what suits them. Thanks Vivek -- 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/