roves from 87.886 ns to 86.429 ns.
>
> 1.
> https://lore.kernel.org/all/bd8c2f5c-464d-44ab-b607-390a87ea4...@huawei.com/
> 2.
> https://lore.kernel.org/all/20250212092552.1779679-1-linyunsh...@huawei.com/
> CC: Jesper Dangaard Brouer
> CC: Luiz Capitulino
> CC: Mel Gorman
> CC
On 2/18/25 4:16 AM, Yunsheng Lin wrote:
> On 2025/2/17 22:20, Chuck Lever wrote:
>> On 2/17/25 7:31 AM, Yunsheng Lin wrote:
>>> As mentioned in [1], it seems odd to check NULL elements in
>>> the middle of page bulk allocating,
>>
>> I think I requested
SVC_MAXPAGES;
> }
>
> - for (filled = 0; filled < pages; filled = ret) {
> - ret = alloc_pages_bulk(GFP_KERNEL, pages, rqstp->rq_pages);
> - if (ret > filled)
> + for (filled = 0; filled < pages; filled += ret) {
> + ret = alloc_pages_bulk(GFP_KERNEL, pages - filled,
> +rqstp->rq_pages + filled);
> + if (ret)
> /* Made progress, don't sleep yet */
> continue;
>
> @@ -674,7 +675,7 @@ static bool svc_alloc_arg(struct svc_rqst *rqstp)
> set_current_state(TASK_RUNNING);
> return false;
> }
> - trace_svc_alloc_arg_err(pages, ret);
> + trace_svc_alloc_arg_err(pages, filled);
> memalloc_retry_wait(GFP_KERNEL);
> }
> rqstp->rq_page_end = &rqstp->rq_pages[pages];
--
Chuck Lever
cur)
> + ),
> +
> + TP_fast_assign(
> + __entry->dev= inode->i_sb->s_dev;
> + __entry->ino= inode->i_ino;
> + __entry->old= old;
> + __entry->new= new;
> + __entry->cur= cur;
> + ),
> +
> + TP_printk("ino=%d:%d:%ld old=%llu.%ld new=%llu.%ld cur=%llu.%ld swp=%c",
> + MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
> + ktime_to_timespec64(__entry->old).tv_sec,
> + ktime_to_timespec64(__entry->old).tv_nsec,
> + ktime_to_timespec64(__entry->new).tv_sec,
> + ktime_to_timespec64(__entry->new).tv_nsec,
> + ktime_to_timespec64(__entry->cur).tv_sec,
> + ktime_to_timespec64(__entry->cur).tv_nsec,
> + (__entry->old == __entry->cur ? 'Y' : 'N')
> + )
> +);
> +
> TRACE_EVENT(inode_needs_update_time,
> TP_PROTO(struct inode *inode,
>struct timespec64 *now,
> @@ -70,6 +142,31 @@ TRACE_EVENT(inode_set_ctime_to_ts,
> __entry->ts_sec, __entry->ts_nsec
> )
> );
> +
> +TRACE_EVENT(fill_mg_cmtime,
> + TP_PROTO(struct inode *inode,
> + ktime_t ctime),
> +
> + TP_ARGS(inode, ctime),
> +
> + TP_STRUCT__entry(
> + __field(dev_t, dev)
> + __field(ino_t, ino)
> + __field(ktime_t,ctime)
> + ),
> +
> + TP_fast_assign(
> + __entry->dev= inode->i_sb->s_dev;
> + __entry->ino= inode->i_ino;
> + __entry->ctime = ctime;
> + ),
> +
> + TP_printk("ino=%d:%d:%ld ctime=%llu.%lu",
> + MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
> + ktime_to_timespec64(__entry->ctime).tv_sec,
> + ktime_to_timespec64(__entry->ctime).tv_nsec
> + )
> +);
> #endif /* _TRACE_TIMESTAMP_H */
>
> /* This part must be outside protection */
>
> --
> 2.45.2
>
>
--
Chuck Lever