pmap problem in FreeBSD current

Mark Tinguely tinguely at casselton.net
Tue Jul 7 15:54:52 UTC 2009


Apologies for the noise. I am not familiar with the sf_buf_alloc/sf_buf_free
code and sent a bad code sequence. If we remove the mapping, it has to
come off the active list also:

/*
 * Detatch mapped page and release resources back to the system.
 */
void
sf_buf_free(struct sf_buf *sf)
{
#ifndef ARM_USE_SMALL_ALLOC
	mtx_lock(&sf_buf_lock);
	sf->ref_count--;
	if (sf->ref_count == 0) {
		TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry);
		nsfbufsused--;
+		pmap_kremove(sf->kva);
+		sf->m = NULL;
+		LIST_REMOVE(sf, list_entry);
		if (sf_buf_alloc_want > 0)
			wakeup_one(&sf_buf_freelist);
	}
	mtx_unlock(&sf_buf_lock);
#endif

--Mark Tinguely.



More information about the freebsd-arm mailing list