Project management for areas/mem

Table of Contents

This document contains org-mode tasks and TODOs for files under: areas/mem/. It is recommended to use emacs when viewing and editing these .org files, as the github rendering view removes the TODO and DONE marking on the tasks.

Top-level headings indicate category, as explained in ../xdp-project.html.

Important medium-term tasks   @medium

TODO page_pool handling in-flight frames during shutdown

DONE xdp_rxq_info_unreg_mem_model take over calling page_pool_destroy

When delaying freeing the registered XDP memory model, then we cannot have drivers calling page_pool_destroy() directly. Figure out a clean code way to do this.

TODO page_pool inflight: howto delay/postpone work in kernel

What is the best way to delay taking down page_pool object when driver calls xdp_rxq_info_unreg_mem_model(), in the case page_pool detect/have in-flight frames?

Should we create a workqueue?

#include <linux/workqueue.h>
static struct workqueue_struct *wq;
wq = alloc_workqueue("xdp_mem_dismantle_wq", 0, 0);
struct work_struct free_work; // embed in struct xdp_mem_allocator?
INIT_WORK(&free_work, __unreg_mem_model_schedule);
queue_work(wq, &free_work);
queue_delayed_work(wq, struct delayed_work *dwork, delay);

It might be overkill to create a new workqueue, what about instead using the default worker thread 'events/n'.

The function calls used instead of queue_work and queue_delayed_work.

schedule_work(wq);
schedule_delayed_work(wq, delay);

There is an example in function amba_deferred_retry_func() how to reschedule the work-queue function from itself via schedule_delayed_work.

Date: 2020-05-22 Fri 17:29

Validate