All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org>
To: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: Alexander Swen <alex-UE4+9DRHXtc@public.gmane.org>,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: cifs ignores sysct setting
Date: Tue, 11 Oct 2011 14:44:58 +0530	[thread overview]
Message-ID: <4E940912.1000408@suse.com> (raw)
In-Reply-To: <20111010093716.68c55bff-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>

On 10/10/2011 07:07 PM, Jeff Layton wrote:
> On Mon, 10 Oct 2011 18:36:15 +0530
> Suresh Jayaraman <sjayaraman-IBi9RG/b67k@public.gmane.org> wrote:
> 
>> On 10/10/2011 03:02 PM, Alexander Swen wrote:
>>>
>>> Hi Steve and other CIFS developers, 
>>>
>>> please help me with the following: 
>>> 1. fix the bug I explain below ;-) 
>>> 2. tell me to what bug tracking system I should to file it to. 
>>>
>>> so, imho this is a bug: when I load the cifs module it insists in setting oplockenabled to 1 while we want to have locking disabled (due to our poormen's nas who's performance sinks to subzero when we do serious io ;-) 
>>>
>>> I've filed this bug at Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644135 
>>>
>>> I paste all details over here as well: 
>>> <paste> 
>>> Package: linux-mage
>>> Version: 2.6.32-5-amd64
>>>
>>> cifs.ko module (which is included in the kernel pkg as far as i know)
>>> cifs driver version 1.61
>>>
>>> when cifs module loads oplock is enabled by default.
>>> so I can do
>>> echo 0 >/proc/fs/cifs/OplockEnabled
>>> but that won't persist through a driver reload. so we tried adding this to /etc/sysctl.conf:
>>> fs.cifs.OplockEnabled = 0
>>> however:
>>>
>>> root@nl14s0008-vm1:~# echo 0 >/proc/fs/cifs/OplockEnabled
>>> root@nl14s0008-vm1:~# cat /proc/fs/cifs/OplockEnabled
>>> 0
>>> root@nl14s0008-vm1:~# modprobe -r cifs
>>> root@nl14s0008-vm1:~# tail -1 /etc/sysctl.conf
>>> fs.cifs.OplockEnabled = 0
>>
>> IIUC, CIFS OplockEnabled is not a proper sysctl, it is just a proc
>> entry. Sysctls are listed below /proc/sys/ directory.
>>
>> For e.g. try
>>    sysctl -w fs.cifs.OplockEnabled=0
>>
>> you'll see the error: "/proc/sys/fs/cifs/OplockEnabled: No such file or
>> directory". Also,
>>
>>    sysctl -p
>>
>> will throw the error: "/proc/sys/fs/cifs/OplockEnabled: No such file or
>> directory"
>>
>> It is not clear to me why do you want to unload and reload cifs module
>> often? The general usage is load module during boot or on first use and
>> the module lives on till the machine goes down.
>>
>> I'm not seeing an justification for making it an module parameter. Could
>> you please explain more on how it will be useful?
>>
> 
> I agree with Alexander on this one...
> 
> Making that a module parm would allow you to set that parameter at boot
> time without needing to add special startup scripts. IMO, all of the
> procfile "switches" under /proc/fs/cifs should be module parms
> instead.

Making it a module parm would mean that it would no longer be possible
to dynamically change OplockEnabled. But, that might be Ok, because it
is quite unusual to change this setting once the module is loaded,
right?. Also, someone won't be able to see what is the current setting.
Again, not a big deal.

> That would also allow us to get rid of some of the special procfile
> handling code for those files as well.
> 

Agreed.

I'll whip up a patch and post it soon.


-Suresh

  parent reply	other threads:[~2011-10-11  9:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1e802d3a-c72d-43a7-8bcb-ddf5534968f9@absint.swen.nu>
     [not found] ` <1e802d3a-c72d-43a7-8bcb-ddf5534968f9-VJN6hnAnNNsoZRmjwiK4Kw@public.gmane.org>
2011-10-10  9:32   ` Fwd: cifs ignores sysct setting Alexander Swen
     [not found]     ` <02d643a6-776c-4ab4-9561-591934939ae8-VJN6hnAnNNsoZRmjwiK4Kw@public.gmane.org>
2011-10-10 13:06       ` Suresh Jayaraman
     [not found]         ` <4E92EDC7.30101-IBi9RG/b67k@public.gmane.org>
2011-10-10 13:37           ` Jeff Layton
     [not found]             ` <20111010093716.68c55bff-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2011-10-11  9:14               ` Suresh Jayaraman [this message]
     [not found]                 ` <4E940912.1000408-IBi9RG/b67k@public.gmane.org>
2011-10-11 14:09                   ` Steve French
     [not found]                     ` <a743c035-7baa-4fbf-afd3-957812e2ac70@absint.swen.nu>
     [not found]                       ` <a743c035-7baa-4fbf-afd3-957812e2ac70-VJN6hnAnNNsoZRmjwiK4Kw@public.gmane.org>
2011-10-11 14:20                         ` Steve French
     [not found]                           ` <ff55fbe8-5fca-4bd0-a91c-c63d3082509a@absint.swen.nu>
     [not found]                             ` <ff55fbe8-5fca-4bd0-a91c-c63d3082509a-VJN6hnAnNNsoZRmjwiK4Kw@public.gmane.org>
2011-10-11 14:47                               ` Steve French
     [not found]                                 ` <CAH2r5mvqk6vjbPObEfqm+UtdLudNCfRnvLxqDmf6i4Y+syX24w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-12  7:10                                   ` Alexander Swen
     [not found]                                     ` <ad4b418d-7021-431a-a32b-4b5aaad0cd31-VJN6hnAnNNsoZRmjwiK4Kw@public.gmane.org>
2011-10-12 11:45                                       ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E940912.1000408@suse.com \
    --to=sjayaraman-ibi9rg/b67k@public.gmane.org \
    --cc=alex-UE4+9DRHXtc@public.gmane.org \
    --cc=jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.