login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
January
»
27
Re: [PATCH 1/3] use lock for 64-bit stats
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Nitin Gupta
Subject:
Re: [PATCH 1/3] use lock for 64-bit stats
Date: Wednesday, January 27, 2010 - 8:51 am
On 01/27/2010 08:40 PM, Pekka Enberg wrote:
quoted text
> Nitin Gupta wrote: >> +static void stat_dec(u32 *v) >> +{ >> + *v = *v - 1; >> +} >> + >> +static void stat64_inc(struct ramzswap *rzs, u64 *v) >> +{ >> + spin_lock(&rzs->stat64_lock); >> + *v = *v + 1; >> + spin_unlock(&rzs->stat64_lock); >> +} >> + >> +static void stat64_dec(struct ramzswap *rzs, u64 *v) >> +{ >> + spin_lock(&rzs->stat64_lock); >> + *v = *v - 1; >> + spin_unlock(&rzs->stat64_lock); >> +} >> + >> +static u64 stat64_read(struct ramzswap *rzs, u64 *v) >> +{ >> + u64 val; >> + >> + spin_lock(&rzs->stat64_lock); >> + val = *v; >> + spin_unlock(&rzs->stat64_lock); >> + >> + return val; >> +} >> +#else >> +#define stat_inc(v) >> +#define stat_dec(v) >> +#define stat64_inc(r, v) >> +#define stat64_dec(r, v) >> +#define stat64_read(r, v) >> +#endif /* CONFIG_RAMZSWAP_STATS */ > > I think I complained about this before: the names are too generic and > could collide with core kernel code. I think they ought to be called > ramzsawp_stat*(). >
I somehow missed this point. I will rename these to rzs_stat*() ('rzs_' prefix is used for other one-liner functions too). Thanks, Nitin --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/3][linux-next] ramzswap: bug fixes and some cleanups
, Nitin Gupta
, (Wed Jan 27, 7:24 am)
[PATCH 1/3] use lock for 64-bit stats
, Nitin Gupta
, (Wed Jan 27, 7:24 am)
[PATCH 2/3] flush block device before reset
, Nitin Gupta
, (Wed Jan 27, 7:24 am)
[PATCH 3/3] set block size to PAGE_SIZE and some cleanups
, Nitin Gupta
, (Wed Jan 27, 7:24 am)
Re: [PATCH 1/3] use lock for 64-bit stats
, Pekka Enberg
, (Wed Jan 27, 8:10 am)
Re: [PATCH 1/3] use lock for 64-bit stats
, Nitin Gupta
, (Wed Jan 27, 8:51 am)
[PATCH 1/3][resend] use lock for 64-bit stats
, Nitin Gupta
, (Wed Jan 27, 7:19 pm)
[PATCH 3/3][resend] set block size to PAGE_SIZE and some c ...
, Nitin Gupta
, (Wed Jan 27, 8:59 pm)
Re: [PATCH 3/3][resend] set block size to PAGE_SIZE and so ...
, Greg KH
, (Wed Jan 27, 9:23 pm)
Re: [PATCH 3/3][resend] set block size to PAGE_SIZE and so ...
, Nitin Gupta
, (Wed Jan 27, 10:37 pm)
Re: [PATCH 3/3][resend] set block size to PAGE_SIZE and so ...
, Greg KH
, (Wed Jan 27, 10:54 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Andi Kleen
Re: - romsignature-checksum-cleanup-2.patch removed from -mm tree
Petr Tesarik
Re: Serious problem with ticket spinlocks on ia64
git
:
Junio C Hamano
Re: Teach "git checkout" to use git-show-ref
Christian Jaeger
Re: Problem with Git.pm bidi_pipe methods
Linus Torvalds
[PATCH 1/7] Make unpack_trees_options bit flags actual bitfields
Jon Smirl
stgit: managing signed-off-by lines
Han-Wen Nienhuys
Re: Cleaning up git user-interface warts
git-commits-head
:
Linux Kernel Mailing List
MIPS: Bonito64: Make Loongson independent from Bonito64 code.
Linux Kernel Mailing List
iwlwifi: initialize spinlock before use
Linux Kernel Mailing List
i2c-i801: Add Intel Cougar Point device IDs
Linux Kernel Mailing List
drm/i915: Add information on pinning and fencing to the i915 list debug.
Linux Kernel Mailing List
ALSA: hda - Clean up quirks for HP laptops with AD1984A
linux-netdev
:
Gerrit Renker
v2 [PATCH 1/4] dccp: Limit feature negotiation to connection setup phase
Richard Cochran
Re: [PATCH v3 3/3] ptp: Added a clock that uses the eTSEC found on the MPC85xx.
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Sathya Perla
[PATCH net-next-2.6] be2net: add multiple RX queue support
Changli Gao
Re: [PATCH 3/3] ifb: move tq from ifb_private
freebsd-current
:
Boris Samorodov
Re: twa + dump = sbwait
韓家標 Bill Hacker
Re: ZFS honesty
Bjoern A. Zeeb
Re: Can not boot 7.0-BETA3 with IPSEC
rmgls
man usb2_core(4)
Sam Leffler
Re: Lots of "ath0: bad series0 hwrate 0x1b" in 8.0-BETA2
Colocation donated by:
Syndicate