Skip to contentSkip to conversation

Report on abnormal behavior of "page_pool" API

DISCUSSION Justin Lai 3 participants 5 messages Jan 31, 2024 – Feb 1, 2024

Subsystems (2)
lore
Share & tools
lore

Justin Lai

author
#0 lore raw

To whom it may concern,

I hope this email finds you well. I am writing to report a behavior which seems to be abnormal.

When I remove the module, I call page_pool_destroy() to release the page_pool, but this message appears, page_pool_release_retry() stalled pool shutdown 1024 inflight 120 sec. Then I tried to return the page to page_pool before calling page_pool_destroy(), so I called page_pool_put_full_page() first, but after doing so, this message was printed, page_pool_empty_ring() page_pool refcnt 0 violation, and the computer crashed.

I would like to ask what could be causing this and how I should fix it.

The information on my working environment is: Ubuntu23.10, linux kernel 6.4, 6.5, 6.6

Thank you for your time and efforts, I am looking forward to your reply.

Best regards,
Justin

#1 lore raw
Quoted 6 lines · Justin Lai

To whom it may concern,

I hope this email finds you well. I am writing to report a behavior which seems to be abnormal.

When I remove the module, I call page_pool_destroy() to release the

Which module?

Quoted 5 lines

page_pool, but this message appears, page_pool_release_retry() stalled pool shutdown 1024 inflight 120 sec. Then I tried to return the page to page_pool before calling page_pool_destroy(), so I called page_pool_put_full_page() first, but after doing so, this message was printed, page_pool_empty_ring() page_pool refcnt 0 violation, and the

As we have "page_ref_count(page) == 1" checking to allow recycling page in pool->ring:
https://elixir.bootlin.com/linux/v6.8-rc2/source/net/core/page_pool.c#L654

It seems somebody is still using the page and manipulating _refcount while the page is sitting in the pool->ring?

Quoted 3 lines

computer crashed.

I would like to ask what could be causing this and how I should fix it.

Not sure if you read the below doc for page_pool, understanding the internal detail and the API usages may help you debuging the problem:
Documentation/networking/page_pool.rst

Quoted 11 lines

The information on my working environment is: Ubuntu23.10, linux kernel 6.4, 6.5, 6.6

Thank you for your time and efforts, I am looking forward to your reply.

Best regards,
Justin

.

#3 lore raw
In reply to Justin Lai
Quoted 8 lines · Justin Lai

To whom it may concern,

I hope this email finds you well. I am writing to report a behavior which seems to be abnormal.

When I remove the module, I call page_pool_destroy() to release the page_pool, but this message appears, page_pool_release_retry() stalled pool shutdown 1024 inflight 120 sec.

I had a problem with the same message:
https://lore.kernel.org/netdev/[email protected]/

Could it be the same problem?

Gerhard

author
#2 lore raw
In reply to Yunsheng Lin
Quoted 9 lines · Justin Lai
Quoted 6 lines

To whom it may concern,

I hope this email finds you well. I am writing to report a behavior which seems to be abnormal.

When I remove the module, I call page_pool_destroy() to release the

Which module?

The PCIe driver

Quoted 7 lines
Quoted 6 lines

page_pool, but this message appears, page_pool_release_retry() stalled pool shutdown 1024 inflight 120 sec. Then I tried to return the page to page_pool before calling page_pool_destroy(), so I called page_pool_put_full_page() first, but after doing so, this message was printed, page_pool_empty_ring() page_pool refcnt 0 violation, and the

Quoted 6 lines

As we have "page_ref_count(page) == 1" checking to allow recycling page in pool->ring:
https://elixir.bootlin.com/linux/v6.8-rc2/source/net/core/page_pool.c#L654

It seems somebody is still using the page and manipulating _refcount while the page is sitting in the pool->ring?

I will confirm this part again, thank you for your reply.

Quoted 9 lines
Quoted 5 lines

computer crashed.

I would like to ask what could be causing this and how I should fix it.

Not sure if you read the below doc for page_pool, understanding the internal detail and the API usages may help you debuging the problem:
Documentation/networking/page_pool.rst

Thank you for your reply. I have read this document, but I will study it again.

Quoted 12 lines
Quoted 12 lines

The information on my working environment is: Ubuntu23.10, linux kernel 6.4, 6.5, 6.6

Thank you for your time and efforts, I am looking forward to your reply.

Best regards,
Justin

.

author
#4 lore raw
In reply to Gerhard Engleder
Quoted 10 lines · Justin Lai
Quoted 8 lines

To whom it may concern,

I hope this email finds you well. I am writing to report a behavior which seems to be abnormal.

When I remove the module, I call page_pool_destroy() to release the page_pool, but this message appears, page_pool_release_retry() stalled pool shutdown 1024 inflight 120 sec.

Quoted 5 lines

I had a problem with the same message:
https://lore.kernel.org/netdev/20230311213709.42625-1-gerhard@engleder-e
mbedded.com/

Could it be the same problem?

It doesn't seem to be the same. Although the error message is similar, I am not using the xdp api.

Quoted 2 lines

Gerhard