Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-29 Thread Xue jiufei
On 2014/8/29 11:26, Junxiao Bi wrote: On 08/28/2014 04:16 PM, Xue jiufei wrote: Hi Junxiao, On 2014/8/25 9:50, Junxiao Bi wrote: Hi Jiufei, Maybe you can consider using PF_FSTRANS flag, set this flag before allocating memory with GFP_KERNEL flag and unset after the allocation. Checking

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-29 Thread Junxiao Bi
On 08/29/2014 03:22 PM, Xue jiufei wrote: On 2014/8/29 11:26, Junxiao Bi wrote: On 08/28/2014 04:16 PM, Xue jiufei wrote: Hi Junxiao, On 2014/8/25 9:50, Junxiao Bi wrote: Hi Jiufei, Maybe you can consider using PF_FSTRANS flag, set this flag before allocating memory with GFP_KERNEL flag

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-28 Thread Xue jiufei
Hi Junxiao, On 2014/8/25 9:50, Junxiao Bi wrote: Hi Jiufei, Maybe you can consider using PF_FSTRANS flag, set this flag before allocating memory with GFP_KERNEL flag and unset after the allocation. Checking this flag in ocfs2 when trying to free some pages during memory direct reclaim. See

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-28 Thread Junxiao Bi
On 08/28/2014 04:16 PM, Xue jiufei wrote: Hi Junxiao, On 2014/8/25 9:50, Junxiao Bi wrote: Hi Jiufei, Maybe you can consider using PF_FSTRANS flag, set this flag before allocating memory with GFP_KERNEL flag and unset after the allocation. Checking this flag in ocfs2 when trying to free

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-27 Thread Sunil Mushran
Hi, What is o2net_wq waiting on that is preventing it from processing the reply for unlock? Sorry for being a bit slow. Do you have the raw stacks of the deadlock? I mean, making that alloc NOFS should not be an issue. But I would like to understand whether we are fixing the actual problem or

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-26 Thread Xue jiufei
Hi, Sunil On 2014/8/26 1:13, Sunil Mushran wrote: On Sun, Aug 24, 2014 at 11:05 PM, Joseph Qi joseph...@huawei.com mailto:joseph...@huawei.com wrote: On 2014/8/25 13:45, Sunil Mushran wrote: Please could you expand on that. In our scenario, one node can mount multiple

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-25 Thread Sunil Mushran
On Sun, Aug 24, 2014 at 11:05 PM, Joseph Qi joseph...@huawei.com wrote: On 2014/8/25 13:45, Sunil Mushran wrote: Please could you expand on that. In our scenario, one node can mount multiple volumes across the cluster. For instance, N1 has mounted ocfs2 volumes say volume1, volume2,

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-24 Thread Junxiao Bi
Hi Jiufei, Maybe you can consider using PF_FSTRANS flag, set this flag before allocating memory with GFP_KERNEL flag and unset after the allocation. Checking this flag in ocfs2 when trying to free some pages during memory direct reclaim. See an example from upstream commit

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-24 Thread Xue jiufei
Hi Sunil, On 2014/8/23 1:08, Sunil Mushran wrote: Allocs made via GFP_NOFS, by definition, should not trigger any reclaim from the fs. So this situation should never arise. That's why all allocs in the dlm have NOFS. Thanks for your reply. I haven't noticed that before. So I think

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-24 Thread Sunil Mushran
Functions in dlmdomain.c are only triggered during mount. So they cannot trigger the deadlock as described above in this thread. I would leave them as is. On Aug 24, 2014 7:06 PM, Xue jiufei xuejiu...@huawei.com wrote: Hi Sunil, On 2014/8/23 1:08, Sunil Mushran wrote: Allocs made via

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-24 Thread Joseph Qi
On 2014/8/25 13:00, Sunil Mushran wrote: Functions in dlmdomain.c are only triggered during mount. So they cannot trigger the deadlock as described above in this thread. I would leave them as is. It is possible if mounts multiple volumes on each node. On Aug 24, 2014 7:06 PM, Xue jiufei

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-24 Thread Sunil Mushran
Please could you expand on that. On Aug 24, 2014 10:42 PM, Joseph Qi joseph...@huawei.com wrote: On 2014/8/25 13:00, Sunil Mushran wrote: Functions in dlmdomain.c are only triggered during mount. So they cannot trigger the deadlock as described above in this thread. I would leave them as is.

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-22 Thread Sunil Mushran
Allocs made via GFP_NOFS, by definition, should not trigger any reclaim from the fs. So this situation should never arise. That's why all allocs in the dlm have NOFS. ___ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com

[Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-19 Thread Xue jiufei
Hi all, We found there may exist a deadlock when system has not sufficient memory. Here's the situation: N1 N2 send message to N1 o2net_wq(kworker) receiving message and call corresponding handler