Last week's numbers suggest the 49ers' run defense has recaptured its swagger after two straight forgettable performances.

In a 35-11 win over the Rams, San Francisco allowed 18 rushing yards - the seventh-fewest in franchise history - and 0.9 yards a carry.

So, problem fixed, right?

Not so fast.

Those numbers should come with an asterisk, given the sorry state of St. Louis' running game. The Rams rank 32nd in the NFL in rushing, are the only team without a rushing touchdown, and their 188 yards in four games are just 35 more than 49ers running back Frank Gore had against their defense last week.

This week, the 49ers will have a better idea where their run defense stands when they host the Texans on Sunday. Houston boasts Arian Foster, 27, who leads the NFL in 100-yard games (23) since 2010 and is one of three backs to rush for more than 1,000 yards in each of the past three seasons. Last year, he went over 5,000 career yards from scrimmage in his 40th game, becoming the third-fastest running back in NFL history to cross that threshold.

In other words, no one will confuse Foster with Daryl Richardson, the Rams' featured running back.

Richardson was held to 16 yards on 12 carries last week as the 49ers emerged from a mini-slump. In back-to-back losses to Seattle and Indianapolis, they surrendered 351 rushing yards, the most they'd allowed in back-to-back contests since they surrendered 400 in the final two games of 2004. The Colts (fourth), Seahawks (fifth) and Texans (seventh) rank among the NFL's top 10 in rushing yards per game.

Niners defensive tackle Justin Smith hopes last week's walloping of the Rams, who were outrushed 219-18, has the 49ers ready for Sunday's challenge.

"It seemed like we got our identity back a little bit - stopping the run and running the ball," Smith said. "I think that was important. And I think it's going to be important to keep having success to keep doing that."

It will help the 49ers if they have the services of All-Pro inside linebacker Patrick Willis, who was sidelined last week with a groin injury, was limited in practice this week and is questionable for Sunday's game.

Willis obviously could lend a hand in defending against Foster, who has flourished in Houston's zone-blocking scheme, which involves misdirection, cut blocks and double teams at the point of attack. The Seahawks also employ zone blocking, and that scheme left its mark on the 49ers in a 29-3 loss at Seattle on Sept. 15.

Seattle rushed for 172 yards, and 49ers nose tackle Ian Williams sustained a broken ankle when he was cut-blocked by Seattle right guard J.R. Sweezy. The block was legal under NFL rules, and Smith said the 49ers will have to be mindful of offensive linemen "biting your ankles and rolling up on them."

"They work well together," Smith said. "They post guys up so that the backside guy can cut them. You watch tape and there are a lot of guys on the ground. It's going to be important for us up front to stay on our blocks and keep our feet out of that stuff."

Foster was dogged by calf and back injuries this summer and had a modest workload in Houston's first three games, averaging 16.3 carries and 63.3 yards per contest. He had 102 yards on 27 carries in last week's 23-20 loss to Seattle, and the Texans collected 179 rushing yards, the most for them since Nov. 22.

"I think we're on the brink of doing what we set out to do every year, which is to be a very dominant run game," Foster said. "We've got some wrinkles to iron out, but we're getting to where we want to go."

Briefly: Texans left tackle Duane Brown (toe) and linebacker Brian Cushing (concussion) are expected to play Sunday. Brown has missed the past two games, and Cushing was sidelined during last week's 23-20 loss to Seattle. ... Niners cornerback Nnamdi Asomugha (knee) is questionable.