From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: Re: [PATCH 3/5] Switch caches notification dynamically Date: Mon, 01 Oct 2007 17:45:46 +0400 Message-ID: <4700FA0A.5040707@openvz.org> References: <46F91841.9070708@openvz.org> <46F919BB.2000701@openvz.org> <4700F2E8.5050904@linux.vnet.ibm.com> <4700F476.4070806@openvz.org> <4700F85B.5090902@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4700F85B.5090902-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Cc: Linux Containers , Christoph Lameter List-Id: containers.vger.kernel.org Balbir Singh wrote: >>>> + if ((buf[0] == '1') && !(s->flags & SLAB_NOTIFY)) { >>> Won't this code break if I pass 10 as input in buf? >> I don't care about this :) And no /sys/slab// file does. >> It's the problem of a user if he pass some shit and doesn't >> see the notifications turned on/off ;) >> > > Well, we don't want confused users? How does a user know what > is a valid value to pass? Are you saying that we don't need The rules are simple - 1 to turn them on and 0 to turn them off and nothing more. These values user sees when he "cat"s this file. > to care about user interface, if so I don't agree. That's the convention used in the /sys/slab// files - the 1 means on the 0 means 0, all the others are not guaranteed :) Thanks, Pavel