Re: [PATCH] mm/vmscan: DRY cleanup for do_try_to_free_pages()

2020-12-18 Thread Jacob Wen
On 12/19/20 9:21 AM, Chris Down wrote: Jacob Wen writes: set_task_reclaim_state() is a function with 3 lines of code of which 2 lines contain WARN_ON_ONCE. I am not comfortable with the current repetition. Ok, but could you please go into _why_ others should feel that way too? There are

Re: [PATCH] mm/vmscan: DRY cleanup for do_try_to_free_pages()

2020-12-18 Thread Jacob Wen
On 12/18/20 10:27 PM, Michal Hocko wrote: On Fri 18-12-20 21:51:48, Jacob Wen wrote: On 12/18/20 6:51 PM, Michal Hocko wrote: On Fri 18-12-20 18:22:17, Jacob Wen wrote: This patch reduces repetition of set_task_reclaim_state() around do_try_to_free_pages(). The changelog really should be

Re: [PATCH] mm/vmscan: DRY cleanup for do_try_to_free_pages()

2020-12-18 Thread Jacob Wen
On 12/18/20 8:17 PM, Matthew Wilcox wrote: On Fri, Dec 18, 2020 at 06:22:17PM +0800, Jacob Wen wrote: This patch reduces repetition of set_task_reclaim_state() around do_try_to_free_pages(). what is a DRY cleanup? DRY is short for "Don't repeat yourself"[1]. [1] https://e

Re: [PATCH] mm/vmscan: DRY cleanup for do_try_to_free_pages()

2020-12-18 Thread Jacob Wen
On 12/18/20 6:51 PM, Michal Hocko wrote: On Fri 18-12-20 18:22:17, Jacob Wen wrote: This patch reduces repetition of set_task_reclaim_state() around do_try_to_free_pages(). The changelog really should be talking about why this is needed/useful. From the above it is not really clear whether

[PATCH] mm/vmscan: DRY cleanup for do_try_to_free_pages()

2020-12-18 Thread Jacob Wen
This patch reduces repetition of set_task_reclaim_state() around do_try_to_free_pages(). Signed-off-by: Jacob Wen --- mm/vmscan.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 257cba79a96d..4bc244b23686 100644

[PATCH] mm, tracing: record slab name for kmem_cache_free()

2020-12-15 Thread Jacob Wen
_core+0x1fd/0x610 ptr=6a6cb484 name=radix_tree_node We can use it to understand what the RCU core is going to free. For example, some users maybe interested in when the RCU core starts freeing reclaimable slabs like dentry to reduce memory pressure. Signed-off-by: Jacob Wen --- include/

Re: [PATCH 2/2] writeback: use DEFINE_WAIT_BIT instead of DEFINE_WAIT for bit wait queue

2020-08-20 Thread Jacob Wen
Can I have a review? On 8/13/20 1:05 PM, Jacob Wen wrote: DEFINE_WAIT_BIT uses wake_bit_function() which is able to avoid false-wakeups due to possible hash collisions in the bit wait table. Signed-off-by: Jacob Wen --- fs/fs-writeback.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [PATCH 1/2] block: use DEFINE_WAIT_BIT instead of DEFINE_WAIT for bit wait queue

2020-08-20 Thread Jacob Wen
Can I have a review? On 8/13/20 1:05 PM, Jacob Wen wrote: DEFINE_WAIT_BIT uses wake_bit_function() which is able to avoid false-wakeups due to possible hash collisions in the bit wait table. Signed-off-by: Jacob Wen --- fs/block_dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [PATCH] block: insert a general SMP memory barrier before wake_up_bit()

2020-08-13 Thread Jacob Wen
On 8/13/20 3:31 PM, Christoph Hellwig wrote: On Thu, Aug 13, 2020 at 10:44:38AM +0800, Jacob Wen wrote: wake_up_bit() uses waitqueue_active() that needs the explicit smp_mb(). Sounds like the barrier should go into wake_up_bit then.. wake_up_bit() doesn't know which one to

[no subject]

2020-07-12 Thread Jacob Wen
unsubscribe linux-kernel

Re: [PATCH v2 1/1] ixgbe: sync the first fragment unconditionally

2019-08-07 Thread Jacob Wen
On 8/7/19 4:38 PM, Firo Yang wrote: The 08/07/2019 15:56, Jacob Wen wrote: I think the description is not correct. Consider using something like below. Thank you for comments. In Xen environment, due to memory fragmentation ixgbe may allocate a 'DMA' buffer with pages th

Re: [PATCH v2 1/1] ixgbe: sync the first fragment unconditionally

2019-08-07 Thread Jacob Wen
I think the description is not correct. Consider using something like below. In Xen environment, due to memory fragmentation ixgbe may allocate a 'DMA' buffer with pages that are not physically contiguous. A NIC doesn't support directly write such buffer. So xen-swiotlb would use the pages,