Re: [PATCH v2] hugetlbfs: Disable softIRQ when taking hugetlb_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Davidlohr Bueso <dave@xxxxxxxxxxxx> writes:
> +void free_huge_page(struct page *page)
> +{
> +	struct hugetlb_free_page_work work;
> +
> +	work.page = page;
> +	INIT_WORK_ONSTACK(&work.work, free_huge_page_workfn);
> +	queue_work(hugetlb_free_page_wq, &work.work);
> +
> +	/*
> +	 * Wait until free_huge_page is done.
> +	 */
> +	flush_work(&work.work);
> +	destroy_work_on_stack(&work.work);

Does flushing really work in softirq context?

Anyways, waiting seems inefficient over fire'n'forget

You'll need a per cpu pre allocated work item and a queue.
Then take a lock on the the queue and link the page into
it and trigger the work item if it's not already pending.

And add a in_interrupt() check of course.


-Andi




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux