1. 07 8月, 2010 1 次提交
  2. 07 7月, 2010 1 次提交
    • A
      sunrpc: make the cache cleaner workqueue deferrable · 8eab945c
      Artem Bityutskiy 提交于
      This patch makes the cache_cleaner workqueue deferrable, to prevent
      unnecessary system wake-ups, which is very important for embedded
      battery-powered devices.
      
      do_cache_clean() is called every 30 seconds at the moment, and often
      makes the system wake up from its power-save sleep state. With this
      change, when the workqueue uses a deferrable timer, the
      do_cache_clean() invocation will be delayed and combined with the
      closest "real" wake-up. This improves the power consumption situation.
      
      Note, I tried to create a DECLARE_DELAYED_WORK_DEFERRABLE() helper
      macro, similar to DECLARE_DELAYED_WORK(), but failed because of the
      way the timer wheel core stores the deferrable flag (it is the
      LSBit in the time->base pointer). My attempt to define a static
      variable with this bit set ended up with the "initializer element is
      not constant" error.
      
      Thus, I have to use run-time initialization, so I created a new
      cache_initialize() function which is called once when sunrpc is
      being initialized.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      8eab945c
  3. 06 7月, 2010 1 次提交
  4. 22 5月, 2010 1 次提交
  5. 17 5月, 2010 2 次提交
    • F
      sunrpc: Include missing smp_lock.h · 99df95a2
      Frederic Weisbecker 提交于
      Now that cache_ioctl_procfs() calls the bkl explicitly, we need to
      include the relevant header as well.
      
      This fixes the following build error:
      
      	net/sunrpc/cache.c: In function 'cache_ioctl_procfs':
      	net/sunrpc/cache.c:1355: error: implicit declaration of function 'lock_kernel'
      	net/sunrpc/cache.c:1359: error: implicit declaration of function 'unlock_kernel'
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      99df95a2
    • F
      procfs: Push down the bkl from ioctl · d79b6f4d
      Frederic Weisbecker 提交于
      Push down the bkl from procfs's ioctl main handler to its users.
      Only three procfs users implement an ioctl (non unlocked) handler.
      Turn them into unlocked_ioctl and push down the Devil inside.
      
      v2: PDE(inode)->data doesn't need to be under bkl
      v3: And don't forget to git-add the result
      v4: Use wrappers to pushdown instead of an invasive and error prone
          handlers surgery.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      d79b6f4d
  6. 24 3月, 2010 1 次提交
  7. 15 3月, 2010 3 次提交
    • N
      sunrpc: never return expired entries in sunrpc_cache_lookup · d202cce8
      NeilBrown 提交于
      If sunrpc_cache_lookup finds an expired entry, remove it from
      the cache and return a freshly created non-VALID entry instead.
      This ensures that we only ever get a usable entry, or an
      entry that will become usable once an update arrives.
      i.e. we will never need to repeat the lookup.
      
      This allows us to remove the 'is_expired' test from cache_check
      (i.e. from cache_is_valid).  cache_check should never get an expired
      entry as 'lookup' will never return one.  If it does happen - due to
      inconvenient timing - then just accept it as still valid, it won't be
      very much past it's use-by date.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      d202cce8
    • N
      sunrpc/cache: factor out cache_is_expired · 2f50d8b6
      NeilBrown 提交于
      This removes a tiny bit of code duplication, but more important
      prepares for following patch which will perform the expiry check in
      cache_lookup and the rest of the validity check in cache_check.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      2f50d8b6
    • N
      sunrpc: don't keep expired entries in the auth caches. · 3af4974e
      NeilBrown 提交于
      currently expired entries remain in the auth caches as long
      as there is a reference.
      This was needed long ago when the auth_domain cache used the same
      cache infrastructure.  But since that (being a very different sort
      of cache) was separated, this test is no longer needed.
      
      So remove the test on refcnt and tidy up the surrounding code.
      
      This allows the cache_dequeue call (which needed to be there to
      drop a potentially awkward reference) can be moved outside of the
      spinlock which is a better place for it.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      3af4974e
  8. 30 11月, 2009 1 次提交
  9. 19 9月, 2009 1 次提交
  10. 18 9月, 2009 1 次提交
  11. 12 9月, 2009 2 次提交
  12. 20 8月, 2009 1 次提交
  13. 10 8月, 2009 6 次提交
  14. 05 8月, 2009 1 次提交
  15. 04 8月, 2009 2 次提交
  16. 16 6月, 2009 1 次提交
  17. 31 3月, 2009 1 次提交
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  18. 08 1月, 2009 1 次提交
  19. 02 5月, 2008 1 次提交
  20. 24 4月, 2008 1 次提交
  21. 29 2月, 2008 1 次提交
  22. 02 2月, 2008 6 次提交
  23. 29 1月, 2008 1 次提交
  24. 11 10月, 2007 1 次提交
  25. 08 8月, 2007 1 次提交