search for: atomic_set

Displaying 20 results from an estimated 461 matches for "atomic_set".

2013 Sep 12
6
[PATCH] RFC xen: suppress Coverity warnings about atomic_read and atomic_set.
...; * Atomically reads the value of @v. */ #define _atomic_read(v) ((v).counter) -#define atomic_read(v) read_atomic(&((v)->counter)) +static inline int atomic_read(atomic_t *v) +{ + /* coverity[incompatible_cast : FALSE] */ + return read_atomic(&v->counter); +} /** * atomic_set - set atomic variable @@ -80,7 +84,11 @@ typedef struct { int counter; } atomic_t; * Atomically sets the value of @v to @i. */ #define _atomic_set(v,i) (((v).counter) = (i)) -#define atomic_set(v,i) write_atomic(&((v)->counter), (i)) +static inline void atomic_set(atomic_t *v, int i)...
2013 Nov 08
4
[PATCH 3/4] xen/manage: Guard against user-space initiated poweroff and XenBus.
...;' + * so that we will ignore XenBus shutdown requests. + */ +static atomic_t shutting_down = ATOMIC_INIT(SHUTDOWN_INVALID); struct suspend_info { int cancelled; @@ -109,7 +117,7 @@ static void do_suspend(void) int err; struct suspend_info si; - shutting_down = SHUTDOWN_SUSPEND; + atomic_set(&shutting_down, SHUTDOWN_SUSPEND); #ifdef CONFIG_PREEMPT /* If the kernel is preemptible, we need to freeze all the processes @@ -173,7 +181,7 @@ out_thaw: thaw_processes(); out: #endif - shutting_down = SHUTDOWN_INVALID; + atomic_set(&shutting_down, SHUTDOWN_INVALID); } #endif /...
2009 Nov 20
3
o2net patch that avoids socket disconnect/reconnect
This fix modifies o2net layer behavior which seems to trigger some DLM race issues during umount/evictions that needs to be fixed as well. I am working on the dlm issues but meanwhile please review this patch. Thanks, --Srini
2009 Jun 19
6
Orphan scan fixes - V2
Implemented the suggestions. Also, moved the ocfs2_orphan_scan_init() to the end of ocfs2_fill_super() instead of calling it earlier in ocfs2_initialize_super(). Sunil
2008 Feb 13
2
[PATCH] o2net: Reconnect after idle time out.V2
...sc_node)); + queue_delayed_work(o2net_wq, &nn->nn_connect_expired, delay); } /* keep track of the nn's sc ref for the caller */ @@ -1193,6 +1198,7 @@ static int o2net_check_handshake(struct * shut down already */ if (nn->nn_sc == sc) { o2net_sc_reset_idle_timer(sc); + atomic_set(&nn->nn_timeout, 0); o2net_set_nn_state(nn, sc, 1, 0); } spin_unlock(&nn->nn_lock); @@ -1391,6 +1397,7 @@ static void o2net_sc_send_keep_req(struc static void o2net_idle_timer(unsigned long data) { struct o2net_sock_container *sc = (struct o2net_sock_container *)data; + str...
2019 Jun 05
10
[PATCH 1/4] drm/virtio: Ensure cached capset entries are valid before copying.
From: David Riley <davidriley at chromium.org> virtio_gpu_get_caps_ioctl could return success with invalid data if a second caller to the function occurred after the entry was created in virtio_gpu_cmd_get_capset but prior to the virtio_gpu_cmd_capset_cb callback being called. This could leak contents of memory as well since the caps_cache allocation is done without zeroing.
2009 Jun 19
6
[PATCH 1/5] ocfs2: Pin journal head before accessing jh->b_committed_data
This patch adds jbd_lock_bh_state() and jbd_unlock_bh_state() around accessses to jh->b_committed_data. Fixes oss bugzilla#1131 http://oss.oracle.com/bugzilla/show_bug.cgi?id=1131 Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com> --- fs/ocfs2/suballoc.c | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/suballoc.c
2015 Jul 10
1
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...unsigned long); > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > index f34e040..abef145 100644 > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) > + > +static inline int PageMobile(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; > +} > + > +static inline void __SetPageMo...
2015 Jul 10
1
[RFCv3 2/5] mm/compaction: enable mobile-page migration
...unsigned long); > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > index f34e040..abef145 100644 > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) > + > +static inline int PageMobile(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; > +} > + > +static inline void __SetPageMo...
2009 Feb 03
10
Convert mle list to a hash
These patches convert the mle list to a hash. The same patches apply on ocfs2 1.4 too. Currently, we use the same number of hash pages for mles and lockres'. This will be addressed in a future patch that will make both of them configurable. Sunil
2012 Feb 08
18
[PATCH 0 of 4] Prune outdated/impossible preprocessor symbols, and update VIOAPIC emulation
Patch 1 removes CONFIG_SMP Patch 2 removes separate smp_{,r,w}mb()s as a result of patch 1 Patch 4 removes __ia64__ defines from the x86 arch tree Patch 3 is related to patch 4 and changes the VIOAPIC to emulate version 0x20 as a performance gain. It preceeds Patch 4 so as to be more clear about the functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2009 Jun 22
1
Orphan Scan - v3
Patch 5 has been respun with the recommended change... remove the ex argument in ocfs2_orphan_scan_lock() and ocfs2_orphan_scan_unlock(). Sunil
2008 Jul 16
2
[PATCH] stopmachine: add stopmachine_timeout v2
...c_t num_threads; static atomic_t thread_ack; +static cpumask_t prepared_cpus; static struct completion finished; static DEFINE_MUTEX(lock); +unsigned long stopmachine_timeout = 200; /* msecs, arbitrary */ + static void set_state(enum stopmachine_state newstate) { /* Reset ack counter. */ - atomic_set(&thread_ack, num_threads); + atomic_set(&thread_ack, atomic_read(&num_threads)); smp_wmb(); state = newstate; } @@ -67,6 +70,8 @@ static int stop_cpu(struct stop_machine_data *smdata) enum stopmachine_state curstate = STOPMACHINE_NONE; int uninitialized_var(ret); + cpu_set(sm...
2008 Jul 16
2
[PATCH] stopmachine: add stopmachine_timeout v2
...c_t num_threads; static atomic_t thread_ack; +static cpumask_t prepared_cpus; static struct completion finished; static DEFINE_MUTEX(lock); +unsigned long stopmachine_timeout = 200; /* msecs, arbitrary */ + static void set_state(enum stopmachine_state newstate) { /* Reset ack counter. */ - atomic_set(&thread_ack, num_threads); + atomic_set(&thread_ack, atomic_read(&num_threads)); smp_wmb(); state = newstate; } @@ -67,6 +70,8 @@ static int stop_cpu(struct stop_machine_data *smdata) enum stopmachine_state curstate = STOPMACHINE_NONE; int uninitialized_var(ret); + cpu_set(sm...
2008 Jul 17
1
[PATCH] stopmachine: add stopmachine_timeout v4
...atomic_t thread_ack; +static cpumask_t prepared_cpus; static struct completion finished; static DEFINE_MUTEX(lock); +unsigned long stopmachine_timeout; /* msecs, default is 0 = "never timeout" */ + static void set_state(enum stopmachine_state newstate) { /* Reset ack counter. */ - atomic_set(&thread_ack, num_threads); + atomic_set(&thread_ack, atomic_read(&num_threads)); smp_wmb(); state = newstate; } @@ -67,6 +70,8 @@ static int stop_cpu(struct stop_machine_data *smdata) enum stopmachine_state curstate = STOPMACHINE_NONE; int uninitialized_var(ret); + cpu_set(sm...
2008 Jul 17
1
[PATCH] stopmachine: add stopmachine_timeout v4
...atomic_t thread_ack; +static cpumask_t prepared_cpus; static struct completion finished; static DEFINE_MUTEX(lock); +unsigned long stopmachine_timeout; /* msecs, default is 0 = "never timeout" */ + static void set_state(enum stopmachine_state newstate) { /* Reset ack counter. */ - atomic_set(&thread_ack, num_threads); + atomic_set(&thread_ack, atomic_read(&num_threads)); smp_wmb(); state = newstate; } @@ -67,6 +70,8 @@ static int stop_cpu(struct stop_machine_data *smdata) enum stopmachine_state curstate = STOPMACHINE_NONE; int uninitialized_var(ret); + cpu_set(sm...
2015 Jul 27
2
[PATCH 2/4] mm/compaction: enable mobile-page migration
...unsigned long); > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > index f34e040..abef145 100644 > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) > + > +static inline int PageMobile(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; > +} > + > +static inline void __SetPageMobile(...
2015 Jul 27
2
[PATCH 2/4] mm/compaction: enable mobile-page migration
...unsigned long); > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > index f34e040..abef145 100644 > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -582,6 +582,25 @@ static inline void __ClearPageBalloon(struct page *page) > atomic_set(&page->_mapcount, -1); > } > > +#define PAGE_MOBILE_MAPCOUNT_VALUE (-255) > + > +static inline int PageMobile(struct page *page) > +{ > + return atomic_read(&page->_mapcount) == PAGE_MOBILE_MAPCOUNT_VALUE; > +} > + > +static inline void __SetPageMobile(...
2009 Feb 26
13
o2dlm mle hash patches - round 2
The changes from the last drop are: 1. Patch 11 removes struct dlm_lock_name. 2. Patch 12 is an unrelated bugfix. Actually is related to a bugfix that we are retracting in mainline currently. The patch may need more testing. While I did hit the condition in my testing, Marcos hasn't. I am sending it because it can be queued for 2.6.30. Give us more time to test. 3. Patch 13 will be useful
2015 Jun 26
0
[RFCv2 1/5] mm/compaction: enable driver page migration
...) (struct page *, unsigned long, unsigned long); diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 91b7f9b..c8a66de 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -649,6 +649,25 @@ static inline void __ClearPageBalloon(struct page *page) atomic_set(&page->_mapcount, -1); } +#define PAGE_MIGRATABLE_MAPCOUNT_VALUE (-255) + +static inline int PageMigratable(struct page *page) +{ + return atomic_read(&page->_mapcount) == PAGE_MIGRATABLE_MAPCOUNT_VALUE; +} + +static inline void __SetPageMigratable(struct page *page) +{ + VM_BUG_ON...